Merge remote-tracking branch 'origin/master'
| | |
| | | data |
| | | }) |
| | | } |
| | | |
| | | //已发布数据更改 |
| | | export function upSaveCode(data) { |
| | | return request({ |
| | | url: 'api/ubcs-code/mdmEngineController/upSaveCode', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | //流程执行中表头 |
| | | export function FlowTable(data){ |
| | | return request({ |
| | |
| | | data: [] |
| | | }, |
| | | exportArr:{}, |
| | | exportArrTwo:{}, |
| | | ids:"" |
| | | }; |
| | | }, |
| | |
| | | //表头数据 用来渲染穿梭框 |
| | | tableHeadData: { |
| | | handler(newval, oldval) { |
| | | console.log(newval) |
| | | if (newval) { |
| | | // 清空data数组 |
| | | this.data = []; |
| | |
| | | key: index, |
| | | }); |
| | | }); |
| | | console.log(this.data) |
| | | // excel表格数据转换 |
| | | this.option.column[0].children = newval.map(obj => { |
| | | return { |
| | |
| | | codeClassifyOid:{ |
| | | handler(newval,oldval){ |
| | | } |
| | | }, |
| | | value:{ |
| | | handler(newval,oldval){ |
| | | console.log('value',newval) |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | handleExcel(){ |
| | | if(this.value <= 0){ |
| | | this.$message.warning('请选择属性') |
| | | }else { |
| | | this.value.map(index => this.tableHeadData[index].prop).forEach((item, index) => { |
| | | this.exportArr[`attrIdIndexMap[${index}]`] = item |
| | | }) |
| | | if(this.radio === 0){ |
| | | if(this.selectRow.length<=0){ |
| | | this.ids=this.tableData.map(item => item.oid).join(',') |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{ |
| | | this.$message.warning('请选择要导出的模板') |
| | | }else { |
| | | //已选择多选 |
| | | const selectList=[] |
| | | //已选择属性 |
| | | let exportArr={} |
| | | this.ids = this.selectRow.map(item => item.oid).join(',') |
| | | this.selectRow.forEach(item=>{ |
| | | selectList.push( |
| | | item.oid |
| | | ) |
| | | }) |
| | | if(this.value <= 0){ |
| | | this.tableHeadData.map(item => item.prop) |
| | | .forEach((prop, index) => { |
| | | this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop; |
| | | }); |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArrTwo,limit:-1}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }) |
| | | }else { |
| | | |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArr}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }else if(this.radio === 1){ |
| | | if(this.value <= 0){ |
| | | this.tableHeadData.map(item => item.prop) |
| | | .forEach((prop, index) => { |
| | | this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop; |
| | | }); |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArrTwo,limit:-1}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlobHandler(res); |
| | |
| | | } |
| | | }) |
| | | }else { |
| | | //已选择多选 |
| | | const selectList=[] |
| | | //已选择属性 |
| | | let exportArr={} |
| | | const ids = this.selectRow.map(item => item.oid).join(',') |
| | | this.selectRow.forEach(item=>{ |
| | | selectList.push( |
| | | item.oid |
| | | ) |
| | | }) |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArr}).then(res=>{ |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }else if(this.radio === 1){ |
| | | this.ids=this.tableData.map(item => item.oid).join(',') |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }) |
| | | }else if(this.radio === 2){ |
| | | const input = this.pageExport.trim(); |
| | | let start, end; |
| | |
| | | return; |
| | | } |
| | | } |
| | | exportCode({ codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: this.limit, page: start, endPage: end }).then((res) => { |
| | | // console.log('res',res) |
| | | if (res) { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }); |
| | | if(this.value >=1 ){ |
| | | exportCode({ codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: this.limit, page: start, endPage: end }).then((res) => { |
| | | // console.log('res',res) |
| | | if (res) { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }); |
| | | }else { |
| | | this.tableHeadData.map(item => item.prop) |
| | | .forEach((prop, index) => { |
| | | this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop; |
| | | }); |
| | | exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArrTwo,limit:this.limit,page: start, endPage: end}).then(res=>{ |
| | | // console.log('res',res) |
| | | if(res){ |
| | | func.downloadFileByBlobHandler(res); |
| | | this.escHandler() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | } |
| | | } |
| | |
| | | :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" |
| | | :title="'已发布数据更改'" |
| | | type="edit" |
| | | :visible.sync="DataVisible"></FormTemplateDialog> |
| | | :visible.sync="DataVisible" @submit="updataSumbit"></FormTemplateDialog> |
| | | <!-- 发布--> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" |
| | | @onLoad="onLoad"></set-personnel> |
| | |
| | | </basic-container> |
| | | </template> |
| | | <script> |
| | | import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode} from "@/api/GetItem"; |
| | | import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode} from "@/api/GetItem"; |
| | | import {processTS, changeStatus} from "@/api/template/setPersonnel" |
| | | import {listCodeAttributeByClassId} from "@/api/integration/integration.js"; |
| | | import integrationTransfer from "@/views/integration/integrationTransfer"; |
| | |
| | | }, |
| | | tableDataArray: { |
| | | handler(newval, oldval) { |
| | | this.keyWordFind=''; |
| | | this.WupinFindValue='' |
| | | this.tableData = newval; |
| | | this.searchResults = newval |
| | | this.doLayout() |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(_index==0){ |
| | | this.keyWordFind=record.field |
| | | } |
| | | }) |
| | | this.tableHeadFindDatas = newval; |
| | | this.WupinFindValue='' |
| | | }, |
| | | }, |
| | | total: { |
| | |
| | | this.$message.warning("只有状态为已发布的数据才能进行数据更改"); |
| | | } else { |
| | | this.DataVisible = true; |
| | | this.rowOid = this.selectRow[0]['oid'] |
| | | } |
| | | }, |
| | | //增加保存 |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | updataSumbit(val){ |
| | | this.DataVisible = false; |
| | | upSaveCode(val).then(res=>{ |
| | | res.data.data.copyfromversion=this.rowOid |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |
| | | }) |
| | | }, |
| | | openBatchImport(type) { |
| | | this.batchImportData.visible = true |
| | | this.batchImportData.type = type |
| | |
| | | }, |
| | | //输入回车搜索 |
| | | tableFindInp() { |
| | | if (this.WupinFindValue.trim() === '') { |
| | | /*if (this.WupinFindValue.trim() === '') { |
| | | this.$message.warning('输入值不能为空') |
| | | return; |
| | | } |
| | | }*/ |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | |
| | | limit: this.page.pageSize, |
| | | [ 'conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*' |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.tableData = res.data.data |
| | | }) |
| | | } |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 模板克隆 --> |
| | | <el-dialog :visible.sync="CloneVisible" append-to-body title="克隆模板"> |
| | | <el-dialog :visible.sync="CloneVisible" append-to-body title="克隆模板" :before-close="cloneClose"> |
| | | <el-container> |
| | | <el-aside width="300px"> |
| | | <div style="margin-bottom: 5px"><el-tag>主题库分类</el-tag></div> |
| | | <!-- 克隆模板的树 沿用首页树的loading和option,但是data和v-model绑定的数据创建一个新的变量,另外点击方法也是重新获取来操作克隆模板的数据--> |
| | | <avue-tree v-model="TreeAvueform" v-loading="loading" :data="Treedata" |
| | | <avue-tree ref="cloneTree" v-model="TreeAvueform" v-loading="loading" :data="Treedata" |
| | | :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | style="height: 50.5vh;margin-right: 10px" |
| | |
| | | </el-container > |
| | | <div style="display: flex; justify-content: flex-end; align-items: center;margin-top: 10px" > |
| | | <el-button size="small " type="primary" @click="Clonehandler">确定</el-button> |
| | | <el-button size="small" @click="CloneVisible=false" >取消</el-button> |
| | | <el-button size="small" @click="cloneClose" >取消</el-button> |
| | | </div> |
| | | <el-dialog |
| | | width="30%" |
| | |
| | | }); |
| | | }) |
| | | }, |
| | | //克隆取消 |
| | | cloneClose(){ |
| | | this.$refs.cloneTree.setCurrentKey(null) |
| | | this.ClonenodeClickList = {} |
| | | this.CloneFormlist=[] |
| | | this.CloneVisible=false; |
| | | }, |
| | | //克隆模板查询 |
| | | CloneEnterFind(){ |
| | | gridCodeClassifyTemplate().then(res => { |
| | |
| | | }, |
| | | //克隆模板单选框改变 |
| | | selectionChange(row) { |
| | | Object.assign(this.CloneModel, row[0]); |
| | | this.CloneSelect = [row[0]]; |
| | | this.CloneSelect = row; |
| | | const { id, name } = row[0]; |
| | | this.CloneModel = { id, name }; |
| | | this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid; |
| | | console.log('row',row) |
| | | console.log('CloneSelect',this.CloneSelect) |
| | | console.log('CloneModel',this.CloneModel) |
| | | }, |
| | | //克隆表单提交 |
| | | Clonesubmit(row, done) { |
| | | // 重新赋值CloneSelect传递的数据为输入框可以修改的数据,CloneModel提交表单输入框双向绑定数据 |
| | | Object.assign(this.CloneSelect[0], this.CloneModel); |
| | | // CloneSelect数组第一项 匹配CloneModel对象 |
| | | copy(this.CloneSelect[0]) |
| | | .then(() => { |
| | | // 因为是嵌套弹窗所以手动关闭CloneinnerVisible,CloneVisible两个弹窗。 |
| | |
| | | // .selectOne(Condition.getQueryWrapper(condition,CodeClassify.class)); |
| | | if(detail == null){//不是最新的不让改 |
| | | throw new ServiceException("当前数据不是最新,请刷新后再修改!"); |
| | | // return R.fail("当前数据不是最新,请刷新后再修改!"); |
| | | } |
| | | //校验下级是否有引用 |
| | | if(checkChildIsLinked(detail.getOid())){ |
| | | return R.fail("dataCascadeLinkedNotDelete"); |
| | | } |
| | | if(checkHasChild(detail.getOid())){ |
| | | return R.fail("此数据有下级,无法进行删除!"); |
| | | } |
| | | return R.status(!checkHasChild(detail.getOid())); |
| | | } |
| | | |
| | |
| | | query.setCurrent(pageHelper.getPage()); |
| | | } |
| | | IPage<CodeClassifyTemplateAttr> doList = baseMapper. |
| | | selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class)); |
| | | selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class).orderByAsc("ordernum")); |
| | | if (!CollectionUtils.isEmpty(doList.getRecords())) { |
| | | dataGrid.setData(codeClassifyTemplateAttrDO2VOs(doList.getRecords())); |
| | | dataGrid.setTotal(VciBaseUtil.getInt(String.valueOf(baseMapper.selectCount(UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class))))); |