Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
xwx
3 years ago
Commit
43f6d824fbcde6a37d28a0c05e888793dc98584b
2 parents
6598d3f6
47a42d10
Merge branch 'master' of
http://113.200.75.45:82/monitor_v3/hg-monitor-web
into master-v32-xwx
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
394 additions
and
24 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/alarmpolicyAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/alarmsubscribeAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/alarmtemplateAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/commonDetail.js
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/alarmpolicy/add.html
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/alarmsubscribe/add.html
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/alarmtemplate/add.html
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/noticeTimely/add.html
hg-monitor-web-zj/src/main/resources/static/vue3/public/css/operationMaintenance.css
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/user/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/user/index.js
hg-monitor-web-base/src/main/resources/static/src/controller/alarmpolicyAdd.js
View file @
43f6d82
...
...
@@ -317,8 +317,9 @@ layui.define(['form', 'admin', 'laydate', 'common', 'sessions', 'reskpilist'], f
charToExpr
(
data
,
'commonlyExpr'
);
charToExpr
(
data
,
'importantExpr'
);
charToExpr
(
data
,
'seriousExpr'
);
form
.
on
(
'submit(add-alarmpolicy-form)'
,
function
()
{
//lsq 告警策略编辑不了,id值应该选择的是submit的按钮的lay-filter 2022-09-27
// form.on('submit(add-alarmpolicy-form)', function () {
form
.
on
(
'submit(alarmpolicy-form-save-id)'
,
function
()
{
delete
data
.
noticeMergeFlagExpr
;
admin
.
req
({
url
:
domainName
+
'/api-web/alarmPolicy/save?access_token='
+
accessToken
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/alarmsubscribeAdd.js
View file @
43f6d82
...
...
@@ -334,7 +334,8 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o
});
data
.
subGroupLists
=
receiveGroupInfoS
;
delete
data
[
"sub_send_type"
];
form
.
on
(
'submit(add-alarmsubscribe-form)'
,
function
()
{
//lsq 提交按钮需要用的是submit按钮的lay-filter 2022-09-27
form
.
on
(
'submit(alarmsubscribe-form-save-id)'
,
function
()
{
var
alrmlevels
=
[],
reportTypes
=
[];
$
(
'input[name="reportType"]:checked'
).
each
(
function
()
{
reportTypes
.
push
(
$
(
this
).
val
());
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/alarmtemplateAdd.js
View file @
43f6d82
...
...
@@ -26,7 +26,8 @@ layui.define(['form','table', 'admin', 'common','sessions'], function (exports)
//保存
$
(
"#alarmtemplate-form-save-id"
).
on
(
"click"
,
function
(){
form
.
on
(
'submit(add-alarmtemplate-form)'
,
function
()
{
//lsq 告警模板编辑不了,id值应该选择的是submit的按钮的lay-filter 2022-09-27
form
.
on
(
'submit(alarmtemplate-form-save-id)'
,
function
()
{
var
data
=
form
.
val
(
"add-alarmtemplate-form"
);
var
policyIds
=
[];
var
policylist
=
$
(
"#alarmtemplate-policy-table-body"
).
find
(
"tr"
);
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/commonDetail.js
View file @
43f6d82
...
...
@@ -4367,6 +4367,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
//lsq 状态信息无其他下探 2022-06-08
var
statusF
=
$menu
.
data
(
'statusf'
);
var
one
=
$menu
.
data
(
'one'
);
//lsq 只有kpiIdent==1时才有性能趋势 2022-09-27
var
kpiIdent
=
$menu
.
data
(
'ident'
);
var
menubox
=
'<div class="detail_menubox" id="detail_menubox_id" style="color:#666;"><ul>'
;
//lsq 只有状态指标下探的标识
if
(
one
==
1
){
...
...
@@ -4380,7 +4382,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
if
(
!
hideM
)
{
menubox
+=
'<li type="m"><i class="layui-icon"></i>过滤多指标</li>'
;
}
if
(
!
nature
)
{
if
(
!
nature
&&
kpiIdent
==
1
)
{
menubox
+=
'<li type="t"><i class="layui-icon"></i>性能趋势</li>'
;
}
// if(!statusF){
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/alarmpolicy/add.html
View file @
43f6d82
...
...
@@ -345,8 +345,8 @@
</div>
</div>
</div>
<button
type=
"submit"
lay-submit
class=
"layui-btn hide"
id=
"alarmpolicy-form-save-id"
>
保存
</button>
<!--lsq 告警策略编辑不了,按钮没有lay-filter 2022-09-27-->
<button
type=
"submit"
lay-submit
class=
"layui-btn hide"
lay-filter=
"alarmpolicy-form-save-id"
id=
"alarmpolicy-form-save-id"
>
保存
</button>
</form>
<script>
layui
.
use
(
'alarmpolicyAdd'
,
function
(
fn
)
{
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/alarmsubscribe/add.html
View file @
43f6d82
...
...
@@ -141,8 +141,8 @@
<textarea
class=
"layui-textarea"
name=
"subDesc"
></textarea>
</div>
</div>
<button
type=
"submit"
lay-submit
class=
"layui-btn hide"
id=
"alarmsubscribe-form-save-id"
>
保存
</button>
<!--lsq 告警订阅编辑不了,按钮没有lay-filter 2022-09-27-->
<button
type=
"submit"
lay-submit
class=
"layui-btn hide"
lay-filter=
"alarmsubscribe-form-save-id"
id=
"alarmsubscribe-form-save-id"
>
保存
</button>
</form>
<!--<style>-->
<!-- #alarmsubscirbe-form-select-users{-->
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/alarmtemplate/add.html
View file @
43f6d82
...
...
@@ -22,8 +22,8 @@
<input
type=
"text"
id=
"alarmTemplateDesc"
name=
"alarmTempDesc"
lay-reqtext=
"请输模板描述"
class=
"layui-input"
>
</div>
</div>
<button
type=
"submit"
lay-submit
class=
"layui-btn hide"
id=
"alarmtemplate-form-save-id"
>
保存
</button>
<!--lsq 告警模板编辑不了,按钮没有lay-filter 2022-09-27-->
<button
type=
"submit"
lay-submit
class=
"layui-btn hide"
lay-filter=
"alarmtemplate-form-save-id"
id=
"alarmtemplate-form-save-id"
>
保存
</button>
</form>
<div
class=
"layui-form layui-form-pane"
>
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/noticeTimely/add.html
View file @
43f6d82
...
...
@@ -54,7 +54,8 @@
<label
class=
"layui-form-label"
>
发送用户
</label>
<div
style=
"width: calc(100% - 110px)"
>
<div
class=
"layui-input-inline"
style=
"width: calc(100% - 10px);display: inline-flex;"
>
<div
class=
"tags"
id=
"select_noticeTimely_id_user"
style=
"width: calc(100% - 20px);border: solid 1px #D2D2D2;margin-top: 0px;height: 36px;"
></div>
<!--lsq 选择用户过多时,超出高度滚动 2022-09-27-->
<div
class=
"tags"
id=
"select_noticeTimely_id_user"
style=
"width: calc(100% - 20px);border: solid 1px #D2D2D2;margin-top: 0px;min-height:36px; height: auto; max-height: 200px; overflow: auto;"
></div>
<i
class=
"layui-icon form-btn-icon"
id=
"noticeTimely-form-select-users"
style=
"line-height: 36px;margin-left: 5px;"
>

</i>
</div>
</div>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/public/css/operationMaintenance.css
View file @
43f6d82
...
...
@@ -21,7 +21,8 @@
}
.yfyw-user
.form-class
{
margin-bottom
:
0px
!important
;
/*margin-bottom: 0px !important;*/
margin
:
5px
;
!important;
}
.yfyw-user
.el-form--label-top
.el-form-item__label
{
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/user/index.html
View file @
43f6d82
...
...
@@ -17,7 +17,7 @@
<i
class=
"iconfont icon-icon--yingbing"
/>
人员基本信息
</div>
<div
style=
"padding-left: 40px;margin-bottom: 6px"
>
<el-form
:rules=
"rules"
ref=
"rule"
:model=
"ruleForm"
label-width=
"120px"
:size=
"$global.elementSize"
label-position=
"
top
"
>
<el-form
:rules=
"rules"
ref=
"rule"
:model=
"ruleForm"
label-width=
"120px"
:size=
"$global.elementSize"
label-position=
"
right
"
>
<el-row
:gutter=
"5"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"姓名"
prop=
"nickname"
class=
"form-class"
>
...
...
@@ -91,7 +91,37 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"出生日期"
prop=
"birthday"
class=
"form-class"
>
<el-date-picker
v-model=
"ruleForm.birthday"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
:readonly=
"isAdmin()"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"入党时间"
prop=
"partyDate"
class=
"form-class"
>
<el-date-picker
v-model=
"ruleForm.partyDate"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
:readonly=
"isAdmin()"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"籍贯"
prop=
"nativePlace"
class=
"form-class"
>
<el-input
v-model=
"ruleForm.nativePlace"
:readonly=
"isAdmin()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"政治面貌"
prop=
"politicsStatus"
class=
"form-class"
>
...
...
@@ -106,19 +136,28 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"犯罪记录证明"
prop=
"hasProof"
class=
"form-class"
>
<el-input
v-model=
"ruleForm.hasProof"
:readonly=
"isAdmin()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"获得证书"
prop=
"post"
class=
"form-textarea"
>
<el-input
v-model=
"ruleForm.certificate"
type=
"textarea"
:readonly=
"isAdmin()"
></el-input>
<el-row
:gutter=
""
>
<el-col
:span=
"12"
>
<el-form-item
label=
"获得证书"
prop=
"post"
>
<el-input
v-model=
"ruleForm.certificate"
:readonly=
"isAdmin()"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"家庭住址"
prop=
"post"
>
<el-input
v-model=
"ruleForm.post"
:readonly=
"isAdmin()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"家庭住址"
prop=
"post"
class=
"form-textarea"
>
<el-input
v-model=
"ruleForm.post"
type=
"textarea"
:readonly=
"isAdmin()"
></el-input>
<el-form-item
label=
"岗位职责"
prop=
"responsibility"
class=
"form-textarea"
>
<el-input
v-model=
"ruleForm.responsibility"
type=
"textarea"
:readonly=
"isAdmin()"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -126,6 +165,56 @@
<el-button
type=
"primary"
size=
"mini"
@
click=
"saveUser()"
>
保存基本信息
</el-button>
</div>
</el-form>
<!--工作简历表格-->
<div
class=
"title"
style=
"padding-left: 0px"
>
<i
class=
"iconfont icon-icon--yingbing"
/>
工作简历信息
<el-button
v-show=
"!isAdmin()"
type=
"primary"
size=
"small"
@
click=
"addFamilyInfo('新增','work')"
plain
>
新增
</el-button>
</div>
<el-table
border
:data=
"workInfoTableData"
stripe
style=
"width: 100%"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
align=
"center"
/>
<el-table-column
prop=
"place"
align=
"center"
label=
"工作单位"
/>
<el-table-column
prop=
"position"
align=
"center"
label=
"职位"
/>
<el-table-column
prop=
"startDate"
align=
"center"
label=
"入职日期"
/>
<el-table-column
prop=
"endDate"
align=
"center"
label=
"离职日期"
/>
<el-table-column
v-if=
"!isAdmin()"
prop=
"address"
align=
"center"
label=
"操作"
width=
"100"
>
<template
#
default=
"scope"
>
<div
class=
"list-handle"
>
<span
class=
"icon-bg"
>
<i
class=
"el-icon-delete"
title=
"删除"
@
click=
"deleteByType(scope.row,'work')"
></i>
</span>
<span
class=
"icon-bg"
>
<i
class=
"el-icon-edit-outline"
title=
"修改"
@
click=
"updateFamilyOrWorkInfo(scope.row,'work')"
></i>
</span>
</div>
</template>
</el-table-column>
</el-table>
<!--家庭成员表格-->
<div
class=
"title"
style=
"margin-top: 10px;padding-left: 0px"
>
<i
class=
"iconfont icon-icon--yingbing"
/>
家庭成员信息
<el-button
v-show=
"!isAdmin()"
type=
"primary"
size=
"small"
@
click=
"addFamilyInfo('新增','family')"
plain
>
新增
</el-button>
</div>
<el-table
border
:data=
"familyInfoTableData"
stripe
style=
"width: 100%"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
align=
"center"
/>
<el-table-column
prop=
"name"
align=
"center"
label=
"成员姓名"
/>
<el-table-column
prop=
"appellation"
align=
"center"
label=
"称谓"
/>
<el-table-column
prop=
"place"
align=
"center"
label=
"工作单位"
/>
<el-table-column
prop=
"position"
align=
"center"
label=
"职位"
/>
<el-table-column
v-if=
"!isAdmin()"
prop=
"address"
align=
"center"
label=
"操作"
width=
"100"
>
<template
#
default=
"scope"
>
<div
class=
"list-handle"
>
<span
class=
"icon-bg"
>
<i
class=
"el-icon-delete"
title=
"删除"
@
click=
"deleteByType(scope.row,'family')"
></i>
</span>
<span
class=
"icon-bg"
>
<i
class=
"el-icon-edit-outline"
title=
"修改"
@
click=
"updateFamilyOrWorkInfo(scope.row,'family')"
></i>
</span>
</div>
</template>
</el-table-column>
</el-table>
</div>
<!--资产信息-->
<div
class=
"title"
>
...
...
@@ -199,5 +288,93 @@
</template>
</cm-dialog>
<!--家庭人员信息弹框-->
<cm-dialog
:title=
"familyDiaTitle"
width=
"60%"
:showDialogVisible=
"familyDiaShow"
@
hidedialog=
"showDiaByType(false,'family')"
:showFooter=
"true"
@
okfunc=
"saveOrUpdateByType('family',familyInfoFormRef)"
>
<template
v-slot
style=
"padding: 10px"
>
<el-form
ref=
"familyInfoFormRef"
:rules=
"familyOrWorkRules"
:model=
"familyInfoForm"
label-width=
"120px"
:size=
"$global.elementSize"
label-position=
"right"
>
<el-row
:gutter=
"5"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"id"
prop=
"id"
v-show=
"false"
>
<el-input
v-model=
"familyInfoForm.id"
:readonly=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"personId"
prop=
"personId"
v-show=
"false"
>
<el-input
v-model=
"familyInfoForm.personId"
:readonly=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"name"
class=
"form-class"
>
<el-input
v-model=
"familyInfoForm.name"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"称谓"
prop=
"appellation"
class=
"form-class"
>
<el-input
v-model=
"familyInfoForm.appellation"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作单位"
prop=
"place"
class=
"form-class"
>
<el-input
v-model=
"familyInfoForm.place"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"职位"
prop=
"position"
class=
"form-class"
>
<el-input
v-model=
"familyInfoForm.position"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</cm-dialog>
<!--工作简历弹框-->
<cm-dialog
:title=
"workDiaTitle"
width=
"60%"
:showDialogVisible=
"workDiaShow"
@
hidedialog=
"showDiaByType(false,'work')"
:showFooter=
"true"
@
okfunc=
"saveOrUpdateByType('work',familyInfoFormRef)"
>
<template
v-slot
style=
"padding: 10px"
>
<el-form
ref=
"familyInfoFormRef"
:rules=
"familyOrWorkRules"
:model=
"workInfoForm"
label-width=
"120px"
:size=
"$global.elementSize"
label-position=
"right"
>
<el-row
:gutter=
"5"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"id"
prop=
"id"
v-show=
"false"
>
<el-input
v-model=
"workInfoForm.id"
:readonly=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"personId"
prop=
"personId"
v-show=
"false"
>
<el-input
v-model=
"workInfoForm.personId"
:readonly=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"工作单位"
prop=
"place"
class=
"form-class"
>
<el-input
v-model=
"workInfoForm.place"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"职位"
prop=
"position"
class=
"form-class"
>
<el-input
v-model=
"workInfoForm.position"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"入职日期"
prop=
"startDate"
class=
"form-class"
>
<el-date-picker
v-model=
"workInfoForm.startDate"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"离职日期"
prop=
"endDate"
class=
"form-class"
>
<el-date-picker
v-model=
"workInfoForm.endDate"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</cm-dialog>
</div>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/user/index.js
View file @
43f6d82
...
...
@@ -243,7 +243,16 @@ export default {
const
{
proxy
}
=
Vue
.
getCurrentInstance
();
let
imageUrl
=
Vue
.
ref
(
''
);
const
familyInfoTableData
=
Vue
.
ref
([]);
// 家庭成员信息弹框显示标识
let
familyDiaShow
=
Vue
.
ref
(
false
);
//家庭成员信息弹框标题
let
familyDiaTitle
=
Vue
.
ref
(
''
);
const
workInfoTableData
=
Vue
.
ref
([]);
// 简历信息弹框显示标识
let
workDiaShow
=
Vue
.
ref
(
false
);
//简历信息弹框标题
let
workDiaTitle
=
Vue
.
ref
(
''
);
let
ruleForm
=
Vue
.
ref
({
nickname
:
''
,
...
...
@@ -260,7 +269,32 @@ export default {
quitTime
:
''
,
state
:
''
,
idcard
:
''
,
politicsStatus
:
''
politicsStatus
:
''
,
hasProof
:
''
,
//是否有无犯罪证明 joke add 20221012
nativePlace
:
''
,
//籍贯 joke add 20221012
birthday
:
''
,
//出生日期 joke add 20221012
partyDate
:
''
,
//入党日期 joke add 20221012
responsibility
:
''
//岗位职责 joke add 20221012
})
let
familyInfoForm
=
Vue
.
ref
({
id
:
''
,
personId
:
props
.
parentNode
.
id
,
//用户id
name
:
''
,
//家庭成员姓名
appellation
:
''
,
//家庭成员称谓
place
:
''
,
//家庭成员工作单位
position
:
''
,
//家庭成员职位
})
let
familyInfoFormRef
=
Vue
.
ref
(
''
);
let
workInfoForm
=
Vue
.
ref
({
id
:
''
,
personId
:
props
.
parentNode
.
id
,
//用户id
place
:
''
,
//工作单位
position
:
''
,
//职位
startDate
:
''
,
//入职日期
endDate
:
''
,
//离职日期
})
...
...
@@ -273,6 +307,8 @@ export default {
},
function
(
res
)
{
if
(
res
&&
res
.
object
)
{
ruleForm
.
value
=
res
.
object
proxy
.
familyInfoTableData
=
res
.
object
.
familyInfoList
;
proxy
.
workInfoTableData
=
res
.
object
.
workExperienceList
;
}
else
{
ruleForm
.
value
=
res
.
object
}
...
...
@@ -282,6 +318,74 @@ export default {
imageUrl
.
value
=
`
$
{
sessionStorage
.
getItem
(
'domainName'
)}
/api-web/
bOpsPerson
/
downloadFile
?
id
=
$
{
props
.
parentNode
.
id
}
&
access_token
=
$
{
localStorage
.
getItem
(
'access_token'
)}
`
}
//点击家庭成员信息的新增按钮事件
let
showDiaByType
=
(
flg
,
type
)
=>
{
if
(
type
===
'family'
){
//展示新增或编辑页面
familyDiaShow
.
value
=
flg
;
if
(
flg
===
false
){
familyInfoForm
.
value
=
{
id
:
''
,
personId
:
props
.
parentNode
.
id
,
//用户id
name
:
''
,
//家庭成员姓名
appellation
:
''
,
//家庭成员称谓
place
:
''
,
//家庭成员工作单位
position
:
''
,
//家庭成员职位
}
}
}
else
if
(
type
===
'work'
){
//展示新增或编辑页面
workDiaShow
.
value
=
flg
;
if
(
flg
===
false
){
workInfoForm
.
value
=
{
id
:
''
,
personId
:
props
.
parentNode
.
id
,
//用户id
place
:
''
,
//工作单位
position
:
''
,
//职位
startDate
:
''
,
//入职日期
endDate
:
''
,
//离职日期
}
}
}
}
let
seTitleByType
=
(
name
,
type
)
=>
{
if
(
type
===
'family'
){
familyDiaTitle
.
value
=
name
+
'家庭成员'
;
}
else
if
(
type
===
'work'
){
workDiaTitle
.
value
=
name
+
'工作经历'
;
}
}
//点击家庭成员新增按钮
let
addFamilyInfo
=
(
name
,
type
)
=>
{
showDiaByType
(
true
,
type
);
seTitleByType
(
name
,
type
);
}
//点击修改按钮
let
updateFamilyOrWorkInfo
=
(
row
,
type
)
=>
{
//获取数据
if
(
type
===
'family'
){
familyInfoForm
.
value
=
{
id
:
row
.
id
,
personId
:
props
.
parentNode
.
id
,
//用户id
name
:
row
.
name
,
//家庭成员姓名
appellation
:
row
.
appellation
,
//家庭成员称谓
place
:
row
.
place
,
//家庭成员工作单位
position
:
row
.
position
,
//家庭成员职位
}
}
else
if
(
type
===
'work'
){
workInfoForm
.
value
=
{
id
:
row
.
id
,
personId
:
props
.
parentNode
.
id
,
//用户id
place
:
row
.
place
,
//工作单位
position
:
row
.
position
,
//职位
startDate
:
row
.
startDate
,
//入职日期
endDate
:
row
.
endDate
,
//离职日期
}
}
addFamilyInfo
(
'编辑'
,
type
);
}
/**
* @Author LH
...
...
@@ -324,6 +428,10 @@ export default {
}
}
const
validatorDate
=
(
rule
,
value
,
callback
)
=>
{
return
value
!==
''
?
callback
()
:
callback
(
new
Error
(
rule
.
message
));
};
/**
* @author LH
* 表单规则校验
...
...
@@ -343,6 +451,33 @@ export default {
]
});
let
familyOrWorkRules
=
Vue
.
ref
({
name
:
[
{
required
:
true
,
message
:
'请输入姓名'
},
{
message
:
'请输入姓名'
,
trigger
:
'blur'
}
],
appellation
:
[
{
required
:
true
,
message
:
'请输入称谓'
},
{
message
:
'请输入称谓'
,
trigger
:
'blur'
}
],
place
:
[
{
required
:
true
,
message
:
'请输入工作单位'
},
{
message
:
'请输入工作单位'
,
trigger
:
'blur'
}
],
position
:
[
{
required
:
true
,
message
:
'请输入职位'
},
{
message
:
'请输入职位'
,
trigger
:
'blur'
}
],
startDate
:
[
{
required
:
true
,
message
:
'请选择入职日期'
},
{
validator
:
validatorDate
,
message
:
'请选择入职日期'
,
trigger
:
'blur'
}
],
endDate
:
[
{
required
:
true
,
message
:
'请选择离职日期'
},
{
validator
:
validatorDate
,
message
:
'请选择离职日期'
,
trigger
:
'blur'
}
],
});
/**
* @EDITOR LH
...
...
@@ -366,6 +501,42 @@ export default {
}
let
saveOrUpdateByType
=
(
type
,
rules
)
=>
{
let
msg
=
'新增'
;
var
data
=
{};
if
(
type
===
'family'
){
if
(
familyDiaTitle
.
value
.
indexOf
(
'新增'
)
==
-
1
){
//表示编辑
msg
=
'编辑'
;
}
data
=
familyInfoForm
.
value
;
}
else
if
(
type
===
'work'
){
if
(
workDiaTitle
.
value
.
indexOf
(
'新增'
)
==
-
1
){
//表示编辑
msg
=
'编辑'
;
}
data
=
workInfoForm
.
value
;
}
rules
.
validate
((
valid
)
=>
{
if
(
valid
){
proxy
.
$http
.
post
(
"/api-web/bOpsPerson/saveOrUpdateByType?type="
+
type
,
data
,
function
(
res
)
{
if
(
res
&&
res
.
success
==
true
)
{
proxy
.
$global
.
showMsg
(
msg
+
'成功!'
);
showDiaByType
(
false
,
type
);
getPage
();
}
});
}
})
}
//删除
let
deleteByType
=
(
row
,
type
)
=>
{
proxy
.
$http
.
post
(
"/api-web/bOpsPerson/deleteByType?type="
+
type
+
"&ids="
+
row
.
id
,
{},
function
(
res
)
{
if
(
res
&&
res
.
success
==
true
)
{
proxy
.
$global
.
showMsg
(
'删除成功!'
);
getPage
();
}
});
}
let
getFile
=
(
param
)
=>
{
let
fileObj
=
param
.
file
...
...
@@ -447,6 +618,21 @@ export default {
// 资产属性
icon
,
rules
,
familyInfoTableData
,
addFamilyInfo
,
showDiaByType
,
seTitleByType
,
saveOrUpdateByType
,
familyDiaShow
,
familyDiaTitle
,
familyInfoForm
,
deleteByType
,
workDiaShow
,
workDiaTitle
,
workInfoForm
,
updateFamilyOrWorkInfo
,
familyOrWorkRules
,
familyInfoFormRef
}
}
}
...
...
Please
register
or
login
to post a comment