|
|
|
@ -171,10 +171,11 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
width="130" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="subDetailModal(scope.row)">出口配置</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="authorityModal(scope.row)">权限配置</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -202,29 +203,63 @@ |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column type="selection" align="center" width="50"></el-table-column> |
|
|
|
<el-table-column label="序号" align="center" prop="xh" width="50"></el-table-column> |
|
|
|
<el-table-column prop="plmField" header-align="center" align="center" :required="true" label="PLM字段名" width="150"> |
|
|
|
<el-table-column prop="plmTable" header-align="center" align="center" :required="true" label="PLM数据表" width="240"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].plmField" placeholder="请输入PLM字段名"></el-input> |
|
|
|
<el-select :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].plmTable" placeholder="请选择数据表名" @change="tableChange(row.xh-1)" style="width: 220px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in tableList" |
|
|
|
:key = "i.tableId" |
|
|
|
:label = "i.tableId" |
|
|
|
:value = "i.tableId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="plmTable" header-align="center" align="center" :required="true" label="PLM字段名" width="220"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-select :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].plmField" placeholder="请选择PLM字段名" style="width: 200px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in fieldList" |
|
|
|
:key = "i.fieldId" |
|
|
|
:label = "i.fieldName" |
|
|
|
:value = "i.fieldId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="plmField" header-align="center" align="center" :required="true" label="PLM字段名" width="150">--> |
|
|
|
<!-- <template slot-scope="{row}">--> |
|
|
|
<!-- <el-input :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].plmField" placeholder="请输入PLM字段名"></el-input>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<el-table-column prop="oaField" header-align="center" align="center" :required="true" label="OA字段名" width="150"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].oaField" placeholder="请输入OA字段名"></el-input> |
|
|
|
<el-input :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].oaField" placeholder="请输入OA字段名"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="plmTable" header-align="center" align="center" :required="true" label="PLM字段类型" width="150"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-select :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].fieldType" placeholder="请选择字段类型" style="width: 130px"> |
|
|
|
<el-option label="人员参数" value="A"></el-option> |
|
|
|
<el-option label="其他参数" value="B"></el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="fieldValue" header-align="center" align="center" :required="true" label="默认值" width="200"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].fieldValue" placeholder="请输入默认值"></el-input> |
|
|
|
<el-input :ref="`${row.xh-1}` + `d`" v-model="tableData[row.xh-1].fieldValue" placeholder="请输入默认值"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="fieldDesc" header-align="center" align="center" :required="true" label="字段描述" width="200"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].fieldDesc" placeholder="请输入字段描述"></el-input> |
|
|
|
<el-input :ref="`${row.xh-1}` + `e`" v-model="tableData[row.xh-1].fieldDesc" placeholder="请输入字段描述"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" header-align="center" align="center" :required="true" label="备注" width="200"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].remark" placeholder="请输入备注"></el-input> |
|
|
|
<el-input :ref="`${row.xh-1}` + `f`" v-model="tableData[row.xh-1].remark" placeholder="请输入备注"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -235,6 +270,57 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog width="730px" title="权限" :close-on-click-modal="false" :visible.sync="authorityFlag"> |
|
|
|
<el-select v-model="authorityData.tableId" placeholder="请选择数据表名" @change="tableChange3" style="width: 220px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in tableList" |
|
|
|
:key = "i.tableId" |
|
|
|
:label = "i.tableId" |
|
|
|
:value = "i.tableId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<!-- <el-table--> |
|
|
|
<!-- :data="authorityData.fieldList"--> |
|
|
|
<!-- border--> |
|
|
|
<!-- :height="300"--> |
|
|
|
<!-- style="width: 100%;">--> |
|
|
|
<el-table |
|
|
|
:data="authorityData.fieldList" |
|
|
|
border |
|
|
|
:height="300" |
|
|
|
ref="authorityTable" |
|
|
|
@row-click="authorityClickRow" |
|
|
|
@selection-change="selectionAuthority" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fieldId" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="200" |
|
|
|
label="字段编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fieldName" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="200" |
|
|
|
label="字段描述"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveAuthorityList">应用</el-button> |
|
|
|
<el-button type="primary" @click="authorityFlag = false">关闭</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- chooseList模态框 --> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
@ -250,6 +336,10 @@ |
|
|
|
getNodeDetail,//获取流程节点出口配置 |
|
|
|
saveRequestNodeDetail,//保存流程节点出口配置 |
|
|
|
deleteRequestNodeDetailByLine,//删除流程当前节点的全部出口配置 |
|
|
|
getTableList, // 获取table列表 |
|
|
|
getFieldList, // 获取表字段 |
|
|
|
getAuthorityFieldList, // 获取权限字段集合 |
|
|
|
saveAuthorityList, // 保存节点权限 |
|
|
|
} from '@/api/processManagement/processManagement.js' |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import DictDataSelect from '../sys/dict-data-select.vue' |
|
|
|
@ -312,11 +402,25 @@ |
|
|
|
updateDate: '', |
|
|
|
updateBy: '' |
|
|
|
}, |
|
|
|
authorityData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
bu: '', |
|
|
|
classificationNo: '', |
|
|
|
nodeId: '', |
|
|
|
nodeName: '', |
|
|
|
fieldId: '', |
|
|
|
tableId: '', |
|
|
|
fieldList: [], |
|
|
|
createBy: '', |
|
|
|
}, |
|
|
|
// ======== 数据列表 ======== |
|
|
|
dataList: [], |
|
|
|
checkedDetail: [], |
|
|
|
nodeList: [], |
|
|
|
tableData: [], |
|
|
|
tableList: [], |
|
|
|
fieldList: [], |
|
|
|
authoritySelections: [], |
|
|
|
// ======== 列表表头 ======== |
|
|
|
columnList: [ |
|
|
|
{ |
|
|
|
@ -427,7 +531,6 @@ |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 109001, |
|
|
|
@ -684,7 +787,6 @@ |
|
|
|
},*/ |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
// ======== 必填规则 ======== |
|
|
|
rules: { |
|
|
|
classificationName: [ |
|
|
|
@ -725,7 +827,7 @@ |
|
|
|
subDetailFlag: false, |
|
|
|
maintenanceFlag: false, |
|
|
|
modalFlag: false, |
|
|
|
|
|
|
|
authorityFlag: false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -738,10 +840,135 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
created () { |
|
|
|
// 获取数据列表 |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
// 点击行选中复选框 |
|
|
|
authorityClickRow (row) { |
|
|
|
this.$refs.authorityTable.toggleRowSelection(row) |
|
|
|
}, |
|
|
|
|
|
|
|
// 多选 |
|
|
|
selectionAuthority (val) { |
|
|
|
this.authoritySelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
// 权限配置 |
|
|
|
authorityModal (row) { |
|
|
|
this.authorityData = { |
|
|
|
site: row.site, |
|
|
|
bu: '', |
|
|
|
classificationNo: row.classificationNo, |
|
|
|
nodeId: row.nodeId, |
|
|
|
nodeName: row.nodeName, |
|
|
|
fieldId: '', |
|
|
|
tableId: this.tableList.length > 0 ? this.tableList[0].tableId : '', |
|
|
|
fieldList: [], |
|
|
|
createBy: this.$store.state.user.name |
|
|
|
} |
|
|
|
// 先清空缓存选中 |
|
|
|
this.$nextTick(() => this.$refs.authorityTable.clearSelection()) |
|
|
|
getAuthorityFieldList(this.authorityData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.authorityData.fieldList = data.rows |
|
|
|
this.authorityData.fieldList.forEach(val => { |
|
|
|
// 回显选中 |
|
|
|
if (val.updateCheck) { |
|
|
|
this.$nextTick(() => this.$refs.authorityTable.toggleRowSelection(val, true)) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.authorityData.fieldList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
this.authorityFlag = true |
|
|
|
}, |
|
|
|
|
|
|
|
// 表改变事件 |
|
|
|
tableChange3 () { |
|
|
|
getAuthorityFieldList(this.authorityData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.authorityData.fieldList = data.rows |
|
|
|
this.authorityData.fieldList.forEach(val => { |
|
|
|
// 回显选中 |
|
|
|
if (val.updateCheck) { |
|
|
|
this.$nextTick(() => this.$refs.authorityTable.toggleRowSelection(val, true)) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.authorityData.fieldList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 保存节点权限 |
|
|
|
saveAuthorityList () { |
|
|
|
let tempData = { |
|
|
|
site: this.authorityData.site, |
|
|
|
bu: '', |
|
|
|
classificationNo: this.authorityData.classificationNo, |
|
|
|
nodeId: this.authorityData.nodeId, |
|
|
|
nodeName: this.authorityData.nodeName, |
|
|
|
fieldId: '', |
|
|
|
tableId: this.authorityData.tableId, |
|
|
|
fieldList: this.authoritySelections, |
|
|
|
createBy: this.$store.state.user.name |
|
|
|
} |
|
|
|
saveAuthorityList(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 表改变事件 |
|
|
|
tableChange (index) { |
|
|
|
let tempData = { |
|
|
|
tableId: this.tableData[index].plmTable |
|
|
|
} |
|
|
|
getFieldList(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.fieldList = data.rows |
|
|
|
} else { |
|
|
|
this.fieldList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
this.tableData[index].plmField = '' |
|
|
|
}, |
|
|
|
|
|
|
|
// 表改变事件 |
|
|
|
tableChange2 (index) { |
|
|
|
let tempData = { |
|
|
|
tableId: this.tableData[index].plmTable |
|
|
|
} |
|
|
|
getFieldList(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.fieldList = data.rows |
|
|
|
} else { |
|
|
|
this.fieldList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取Table列表 |
|
|
|
getTableList (type) { |
|
|
|
let tempData = { |
|
|
|
tableType: type |
|
|
|
} |
|
|
|
getTableList(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.tableList = data.rows |
|
|
|
} else { |
|
|
|
this.tableList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// ======= 正则校验 ======= |
|
|
|
handleInput (value, type) { |
|
|
|
// 大于等于0,且只能输入4位小数 |
|
|
|
@ -802,6 +1029,12 @@ |
|
|
|
this.requestCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
// 刷新当前页表 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
|
|
|
|
this.tableList = [] |
|
|
|
this.fieldList = [] |
|
|
|
if (row.menuId === '108002') { |
|
|
|
this.getTableList('plm_change') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
@ -823,22 +1056,40 @@ |
|
|
|
}, |
|
|
|
// 点击新增更多 |
|
|
|
handleAddBtn () { |
|
|
|
let obj = {} |
|
|
|
obj.site = this.$store.state.user.site, |
|
|
|
obj.classificationNo = this.nodeCurrentRow.classificationNo, |
|
|
|
obj.workflowId = this.nodeCurrentRow.workflowId, |
|
|
|
obj.nodeId = this.nodeCurrentRow.nodeId, |
|
|
|
obj.nodeName = this.nodeCurrentRow.nodeName, |
|
|
|
obj.createBy = this.$store.state.user.name, |
|
|
|
obj.remark = "", |
|
|
|
obj.plmField = "", |
|
|
|
obj.oaField = "", |
|
|
|
obj.fieldValue = "", |
|
|
|
obj.fieldDesc = "", |
|
|
|
obj.orderRef1 = "", |
|
|
|
obj.orderRef2 = "", |
|
|
|
obj.orderRef3 = "", |
|
|
|
obj.orderRef4 = "" |
|
|
|
let obj = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
classificationNo: this.nodeCurrentRow.classificationNo, |
|
|
|
workflowId: this.nodeCurrentRow.workflowId, |
|
|
|
nodeId: this.nodeCurrentRow.nodeId, |
|
|
|
nodeName: this.nodeCurrentRow.nodeName, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
remark: '', |
|
|
|
plmField: '', |
|
|
|
oaField: '', |
|
|
|
fieldValue: '', |
|
|
|
fieldDesc: '', |
|
|
|
orderRef1: '', |
|
|
|
orderRef2: '', |
|
|
|
orderRef3: '', |
|
|
|
orderRef4: '', |
|
|
|
plmTable: '', |
|
|
|
fieldType: 'B' |
|
|
|
} |
|
|
|
// obj.site = this.$store.state.user.site |
|
|
|
// obj.classificationNo = this.nodeCurrentRow.classificationNo |
|
|
|
// obj.workflowId = this.nodeCurrentRow.workflowId |
|
|
|
// obj.nodeId = this.nodeCurrentRow.nodeId |
|
|
|
// obj.nodeName = this.nodeCurrentRow.nodeName |
|
|
|
// obj.createBy = this.$store.state.user.name |
|
|
|
// obj.remark = "" |
|
|
|
// obj.plmField = "" |
|
|
|
// obj.oaField = "" |
|
|
|
// obj.fieldValue = "" |
|
|
|
// obj.fieldDesc = "" |
|
|
|
// obj.orderRef1 = "" |
|
|
|
// obj.orderRef2 = "" |
|
|
|
// obj.orderRef3 = "" |
|
|
|
// obj.orderRef4 = "" |
|
|
|
this.tableData.push(obj) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -899,6 +1150,9 @@ |
|
|
|
getNodeDetail(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.tableData = data.rows |
|
|
|
for (let i = 0; i < this.tableData.length; i++) { |
|
|
|
this.tableChange2(i) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tableData = [] |
|
|
|
} |
|
|
|
@ -1030,12 +1284,20 @@ |
|
|
|
|
|
|
|
checkDataBySubDetail(){ |
|
|
|
for (let i = 0; i < this.tableData.length; i++) { |
|
|
|
if(this.tableData[i].plmTable === '' || this.tableData[i].plmTable == null){ |
|
|
|
this.$message.warning('序号' + (i+1) +'未选择PLM数据表,数据表为必填项!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.tableData[i].plmField === '' || this.tableData[i].plmField == null){ |
|
|
|
this.$message.warning('序号' + (i+1) +'未选择PLM字段名,字段名为必填项!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.tableData[i].oaField === '' || this.tableData[i].oaField == null){ |
|
|
|
this.$message.warning('序号' + (i+1) +'未填写OA字段名,字段名为必填项!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.tableData[i].plmField === '' || this.tableData[i].plmField == null){ |
|
|
|
this.$message.warning('序号' + (i+1) +'未填写PLM字段名,字段名为必填项!') |
|
|
|
if(this.tableData[i].fieldType === '' || this.tableData[i].fieldType == null){ |
|
|
|
this.$message.warning('序号' + (i+1) +'未选择PLM字段类型,字段类型为必填项!') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|