|
|
@ -105,13 +105,14 @@ |
|
|
fixed="right" |
|
|
fixed="right" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="200" |
|
|
|
|
|
|
|
|
width="240" |
|
|
:label="buttons.cz"> |
|
|
:label="buttons.cz"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a @click="initAuthStep(scope.row)">{{buttons.reviewer}}</a> |
|
|
<a @click="initAuthStep(scope.row)">{{buttons.reviewer}}</a> |
|
|
<a @click="initModel(scope.row)">{{buttons.edit}}</a> |
|
|
|
|
|
<a @click="delAuditRules(scope.row)">{{buttons.delete}}</a> |
|
|
|
|
|
<a v-if="scope.row.allToolType != 'Y'" @click="toolAuditRules(scope.row)">{{'设置工具类型'}}</a> |
|
|
|
|
|
|
|
|
<a @click="initModel(scope.row)">| {{buttons.edit}}</a> |
|
|
|
|
|
<a @click="delAuditRules(scope.row)">| {{buttons.delete}}</a> |
|
|
|
|
|
<a v-if="scope.row.allToolType != 'Y'" @click="toolAuditRules(scope.row)"> | {{'设置工具类型'}}</a> |
|
|
|
|
|
<a v-if="scope.row.applicantFlag == 'Y'" @click="userToolAuditRules(scope.row)">{{'设置申请人'}}</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -157,9 +158,12 @@ |
|
|
<el-form-item :label="'适用所有工具类型'"> |
|
|
<el-form-item :label="'适用所有工具类型'"> |
|
|
<el-checkbox v-model="saveAuditRuleData.allToolType"></el-checkbox> |
|
|
<el-checkbox v-model="saveAuditRuleData.allToolType"></el-checkbox> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="'是否设置申请人'"> |
|
|
|
|
|
<el-checkbox v-model="saveAuditRuleData.applicantFlag"></el-checkbox> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item :label="inputSearch12"> |
|
|
<el-form-item :label="inputSearch12"> |
|
|
<el-input style="width: 430px;" v-model="saveAuditRuleData.remark"></el-input> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-input style="width: 336px;" v-model="saveAuditRuleData.remark"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
@ -317,11 +321,29 @@ |
|
|
|
|
|
|
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<!-- 设置申请人--> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
style="font-size: 12px" |
|
|
|
|
|
v-drag |
|
|
|
|
|
:title="'设置申请人'" |
|
|
|
|
|
:visible.sync="userVisible" |
|
|
|
|
|
width="516px" |
|
|
|
|
|
:append-to-body="true"> |
|
|
|
|
|
<el-transfer v-model="selectUserList" :data="userList" :titles="['未设置申请人列表', '已设置申请人列表']"></el-transfer> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<div style="margin-top: 5px"> |
|
|
|
|
|
<el-button type="primary" @click="saveUserToolAuditRules()">确定</el-button> |
|
|
|
|
|
<el-button @click="userVisible = false" type="primary">取消</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
import {userList} from "@/api/user.js" |
|
|
import column from "../common/column"; |
|
|
import column from "../common/column"; |
|
|
import { |
|
|
import { |
|
|
searchSysLanguageParam, |
|
|
searchSysLanguageParam, |
|
|
@ -342,6 +364,10 @@ |
|
|
saveUserFavorite, |
|
|
saveUserFavorite, |
|
|
removeUserFavorite |
|
|
removeUserFavorite |
|
|
} from '@/api/userFavorite.js' |
|
|
} from '@/api/userFavorite.js' |
|
|
|
|
|
import { |
|
|
|
|
|
getAuthRuleApplicantList, |
|
|
|
|
|
saveAuthRuleApplicantList |
|
|
|
|
|
} from '@/api/auditManagement/authRuleApplicant.js' |
|
|
import { |
|
|
import { |
|
|
getAuthRuleList, |
|
|
getAuthRuleList, |
|
|
saveAuthRule, |
|
|
saveAuthRule, |
|
|
@ -368,12 +394,16 @@ |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
userVisible: false, |
|
|
|
|
|
selectAuthRule: {}, |
|
|
|
|
|
userList: [], |
|
|
|
|
|
selectUserList: [], |
|
|
toolVisible: false, |
|
|
toolVisible: false, |
|
|
partFamilyList: [], |
|
|
partFamilyList: [], |
|
|
selectPartFamilyList: [], |
|
|
selectPartFamilyList: [], |
|
|
selectRow: '', |
|
|
selectRow: '', |
|
|
saveAuditRuleData: { |
|
|
saveAuditRuleData: { |
|
|
recordTypeDb: '', |
|
|
|
|
|
|
|
|
recordTypeDb: 1, |
|
|
ruleId: '', |
|
|
ruleId: '', |
|
|
ruleDesc: '', |
|
|
ruleDesc: '', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -391,6 +421,7 @@ |
|
|
element4: '', |
|
|
element4: '', |
|
|
byElement4: '', |
|
|
byElement4: '', |
|
|
allToolType: true, |
|
|
allToolType: true, |
|
|
|
|
|
applicantFlag: false, |
|
|
}, |
|
|
}, |
|
|
authStepData: { |
|
|
authStepData: { |
|
|
id: 0, |
|
|
id: 0, |
|
|
@ -857,6 +888,59 @@ |
|
|
this.getBusinessRoleList() |
|
|
this.getBusinessRoleList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 获取所有用户列表 |
|
|
|
|
|
userToolAuditRules(row) { |
|
|
|
|
|
this.selectAuthRule = row |
|
|
|
|
|
this.userVisible = true |
|
|
|
|
|
this.searchUserList() |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取所有用户列表 |
|
|
|
|
|
searchUserList() { |
|
|
|
|
|
userList({site: this.site, status: 1}).then(({data}) => { |
|
|
|
|
|
if (data && data.code == 0) { |
|
|
|
|
|
this.userList = data.list.map(item => { |
|
|
|
|
|
let newItem = { |
|
|
|
|
|
key: item.username, |
|
|
|
|
|
label: item.username + " - " + item.userDisplay, |
|
|
|
|
|
} |
|
|
|
|
|
return newItem |
|
|
|
|
|
}) |
|
|
|
|
|
this.searchUserToolAuditRulesList() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取以设置的申请人列表 |
|
|
|
|
|
searchUserToolAuditRulesList() { |
|
|
|
|
|
getAuthRuleApplicantList({authRuleId: this.selectAuthRule.ruleId}).then(({data}) => { |
|
|
|
|
|
if (data && data.code == 0) { |
|
|
|
|
|
this.selectUserList = data.data.map(item => { |
|
|
|
|
|
return item.userName |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 保存规则对应申请人 |
|
|
|
|
|
saveUserToolAuditRules() { |
|
|
|
|
|
let authRuleApplicants = this.selectUserList.map( item => { |
|
|
|
|
|
let newItem= { |
|
|
|
|
|
authRuleId:this.selectAuthRule.ruleId, |
|
|
|
|
|
userName:item , |
|
|
|
|
|
} |
|
|
|
|
|
return newItem |
|
|
|
|
|
}) |
|
|
|
|
|
let dto = { |
|
|
|
|
|
authRuleId : this.selectAuthRule.ruleId, |
|
|
|
|
|
authRuleApplicants : authRuleApplicants, |
|
|
|
|
|
} |
|
|
|
|
|
saveAuthRuleApplicantList(dto).then(({data}) => { |
|
|
|
|
|
if (data && data.code == 0){ |
|
|
|
|
|
this.$message.success(data.msg) |
|
|
|
|
|
this.userVisible = false |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$message.success(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 设置工具类型 |
|
|
// 设置工具类型 |
|
|
toolAuditRules(row) { |
|
|
toolAuditRules(row) { |
|
|
this.toolVisible = true |
|
|
this.toolVisible = true |
|
|
@ -1147,6 +1231,7 @@ |
|
|
this.saveAuditRuleData.minValue = 0 |
|
|
this.saveAuditRuleData.minValue = 0 |
|
|
this.saveAuditRuleData.maxValue = 0 |
|
|
this.saveAuditRuleData.maxValue = 0 |
|
|
this.saveAuditRuleData.allToolType = this.saveAuditRuleData.allToolType ? 'Y' : 'N' |
|
|
this.saveAuditRuleData.allToolType = this.saveAuditRuleData.allToolType ? 'Y' : 'N' |
|
|
|
|
|
this.saveAuditRuleData.applicantFlag = this.saveAuditRuleData.applicantFlag ? 'Y' : 'N' |
|
|
saveAuthRule(this.saveAuditRuleData).then(({data}) => { |
|
|
saveAuthRule(this.saveAuditRuleData).then(({data}) => { |
|
|
if (data.code == 0) { |
|
|
if (data.code == 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
@ -1168,7 +1253,7 @@ |
|
|
this.setUp.saveButton = false |
|
|
this.setUp.saveButton = false |
|
|
if (row == null) { |
|
|
if (row == null) { |
|
|
this.saveAuditRuleData.id = 0 |
|
|
this.saveAuditRuleData.id = 0 |
|
|
this.saveAuditRuleData.recordTypeDb = '' |
|
|
|
|
|
|
|
|
this.saveAuditRuleData.recordTypeDb = 1 |
|
|
this.saveAuditRuleData.ruleId = '' |
|
|
this.saveAuditRuleData.ruleId = '' |
|
|
this.saveAuditRuleData.ruleDesc = '' |
|
|
this.saveAuditRuleData.ruleDesc = '' |
|
|
this.saveAuditRuleData.priority = 0 |
|
|
this.saveAuditRuleData.priority = 0 |
|
|
@ -1185,6 +1270,7 @@ |
|
|
this.saveAuditRuleData.byElement4 = '' |
|
|
this.saveAuditRuleData.byElement4 = '' |
|
|
this.saveAuditRuleData.remark = '' |
|
|
this.saveAuditRuleData.remark = '' |
|
|
this.saveAuditRuleData.toolType = true |
|
|
this.saveAuditRuleData.toolType = true |
|
|
|
|
|
this.saveAuditRuleData.applicantFlag = false |
|
|
} else { |
|
|
} else { |
|
|
this.saveAuditRuleData.id = row.id |
|
|
this.saveAuditRuleData.id = row.id |
|
|
this.saveAuditRuleData.recordTypeDb = Number(row.recordTypeDb) |
|
|
this.saveAuditRuleData.recordTypeDb = Number(row.recordTypeDb) |
|
|
@ -1203,6 +1289,7 @@ |
|
|
this.saveAuditRuleData.byElement4 = row.byElement4 |
|
|
this.saveAuditRuleData.byElement4 = row.byElement4 |
|
|
this.saveAuditRuleData.remark = row.remark |
|
|
this.saveAuditRuleData.remark = row.remark |
|
|
this.saveAuditRuleData.allToolType = row.allToolType == 'Y' ? true : false |
|
|
this.saveAuditRuleData.allToolType = row.allToolType == 'Y' ? true : false |
|
|
|
|
|
this.saveAuditRuleData.applicantFlag = row.applicantFlag == 'Y' ? true : false |
|
|
if (row.active == "启用") { |
|
|
if (row.active == "启用") { |
|
|
this.saveAuditRuleData.active = 'Y' |
|
|
this.saveAuditRuleData.active = 'Y' |
|
|
} else { |
|
|
} else { |
|
|
|