| | |
| | | |
| | | <script> |
| | | import {businese} from '@/api/work/businese' |
| | | import {FlowTable} from "@/api/GetItem"; |
| | | import {FlowTable, batchUpdateCode} from "@/api/GetItem"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {getDictionary} from "@/api/system/dict"; |
| | | import vciWebRefer from "../refer/vciWebRefer.vue"; |
| | |
| | | export default { |
| | | name: "BusinessWork", |
| | | components: { vciWebRefer }, |
| | | props:['ids','templateId',"taskId","modelKey","codeClassifyOid"], |
| | | props:['ids','templateId',"taskId","modelKey","codeClassifyOid",'stageAttrs'], |
| | | data() { |
| | | return { |
| | | BuinessOids:[], |
| | |
| | | this.BuinseseRend() |
| | | }, |
| | | deep:true |
| | | }, |
| | | stageAttrs(newval,oldval){ |
| | | this.hasEditor=newval.length>0; |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | }, |
| | |
| | | HandlerSave(){ |
| | | this.editingRow = null; |
| | | //保存 |
| | | this.$message.success(this.tableData[0].tuhao) |
| | | batchUpdateCode(this.tableData).then(res => { |
| | | console.log(res) |
| | | if(res.data.data.success){ |
| | | this.$message.success("保存成功"); |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | //表格头渲染 |
| | | CrudHeaderRend() { |
| | |
| | | 'modelKey': this.modelKey, |
| | | 'codeClassifyOid': this.codeClassifyOid |
| | | }).then((res) => { |
| | | this.hasEditor=res.data.tableDefineVO.hasEditor; |
| | | this.options = res.data.tableDefineVO.seniorQueryColumns; |
| | | this.List = res.data.tableDefineVO.cols[0]; |
| | | this.tableHeadData=[]; |
| | | this.List.forEach((item) => { |
| | | let editAttr=this.stageAttrs.filter(stageitem => stageitem.attrId == item.field); |
| | | let columnItem = { |
| | | label: item.title, |
| | | prop: item.field, |
| | | type: this.columnType[item.type], |
| | | sortable: item.sort, |
| | | width: item.minWidth, |
| | | edit:this.columnType[item.edit] |
| | | width: item.minWidth |
| | | }; |
| | | if(item.field == 'id' && validatenull(item.templet)){ |
| | | //企业编码的默认添加超链接,暂未实现 |
| | |
| | | } |
| | | |
| | | } |
| | | if(validatenull(item.edit)) { |
| | | if (typeof item.editConfig == "string") { |
| | | if(editAttr.length>0) { |
| | | debugger; |
| | | editAttr=editAttr[0] |
| | | columnItem.edit= 'text';//this.columnType[editAttr.edit] |
| | | if (typeof editAttr.editConfig == "string") { |
| | | columnItem.editConfig = eval("(" + item.editConfig + ")"); |
| | | } else { |
| | | columnItem.editConfig = item.editConfig |