| | |
| | | item.name |
| | | }} |
| | | </el-button> |
| | | <span v-if="tableHeadFindData.length > 0"> |
| | | <el-select v-model="keyWordFind" slot="prepend" placeholder="请选择" size="small"> |
| | | <el-option v-for="item in tableHeadFindData" :label="item.label" :value="item.prop"></el-option> |
| | | </el-select> |
| | | <el-input v-model="WupinFindValue" placeholder="请输入关键字按回车查询" |
| | | size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" |
| | | @keyup.enter.native="tableFindInp" v-if="tableHeadFindData.length > 0"></el-input> |
| | | <span style="margin-left: 10px" v-if="tableHeadFindData.length > 0"> |
| | | @keyup.enter.native="tableFindInp"></el-input> |
| | | </span> |
| | | <span v-if="tableHeadFindData.length > 0" style="margin-left: 10px"> |
| | | <p style="font-size: 13px;display: inline-block;"> 状态:</p> |
| | | <el-select v-model="statusSelect" slot="prepend" placeholder="请选择" size="small" @change="cellSelectHandler"> |
| | | <el-select slot="prepend" v-model="statusSelect" placeholder="请选择" size="small" |
| | | @change="cellSelectHandler"> |
| | | <el-option label="全部" value="all"></el-option> |
| | | <el-option label="已发布" value="Released"></el-option> |
| | | <el-option label="编辑中" value="Editing"></el-option> |
| | |
| | | <el-option label="审核中" value="Auditing"></el-option> |
| | | </el-select></span> |
| | | </div> |
| | | <el-table ref="dataTable" v-loading="isLoading" :data="tableData" |
| | | <el-table ref="dataTable" v-loading="isLoading" :data="tableData" |
| | | :height="tableHeight" |
| | | @select="handleSelection" @cell-click="handleCellClick" @row-click="handleRowClick" |
| | | @select-all="handleSelectionAll" @selection-change="handleSelectionChange" |
| | | @sort-change="sortChange"> |
| | | <el-table-column fixed type="selection" width="55" v-if="tableData.length != 0"></el-table-column> |
| | | <el-table-column fixed label="序号" type="index" width="55" v-if="tableData.length != 0"> |
| | | <el-table-column v-if="tableData.length != 0" fixed type="selection" width="55"></el-table-column> |
| | | <el-table-column v-if="tableData.length != 0" fixed label="序号" type="index" width="55"> |
| | | </el-table-column> |
| | | <el-table-column v-for="item in this.tableHeadFindData" :key="item.id" :formatter="item.formatter" |
| | | :label="item.label" |
| | |
| | | :type="edit" |
| | | :visible.sync="DataVisible"></FormTemplateDialog> |
| | | <!-- 发布--> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" @onLoad="onLoad"></set-personnel> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" |
| | | @onLoad="onLoad"></set-personnel> |
| | | <!-- 停用--> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate" @onLoad="onLoad"></set-personnel> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate" |
| | | @onLoad="onLoad"></set-personnel> |
| | | <!-- 启用--> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable" @onLoad="onLoad"></set-personnel> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable" |
| | | @onLoad="onLoad"></set-personnel> |
| | | <!-- 回收--> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery" @onLoad="onLoad"></set-personnel> |
| | | <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery" |
| | | @onLoad="onLoad"></set-personnel> |
| | | <!-- 高级查询--> |
| | | <advanced-query :options="this.options" :visible.sync="findvisible" |
| | | @echoContion="echoContion"></advanced-query> |
| | | <!-- 导出--> |
| | | <MasterTransfer :codeClassifyOid="codeClassifyOid" :limit="page.pageSize" :templateOid="templateOid" :selectRow="selectRow" |
| | | :tableData="tableData" :tableHeadData="tableHeadFindData" |
| | | <MasterTransfer :codeClassifyOid="codeClassifyOid" :limit="page.pageSize" :selectRow="selectRow" |
| | | :tableData="tableData" |
| | | :tableHeadData="tableHeadFindData" :templateOid="templateOid" |
| | | :visible.sync="dialogPush"></MasterTransfer> |
| | | <!-- 相似项--> |
| | | <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid" |
| | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible" :resetTable="CrudRend"> |
| | | <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :resetTable="CrudRend" |
| | | :visible.sync="batchImportData.visible"> |
| | | </BatchImport> |
| | | </div> |
| | | <div class="bottom"> |
| | |
| | | </basic-container> |
| | | </template> |
| | | <script> |
| | | import {MasterTable, TableData, FindData, addSaveCode, editSaveCode,deleteCode} from "@/api/GetItem"; |
| | | import {processTS,changeStatus} from "@/api/template/setPersonnel" |
| | | import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode} from "@/api/GetItem"; |
| | | import {processTS, changeStatus} from "@/api/template/setPersonnel" |
| | | import {listCodeAttributeByClassId} from "@/api/integration/integration.js"; |
| | | import integrationTransfer from "@/views/integration/integrationTransfer"; |
| | | import SetPersonnel from "@/components/template/SetPersonnel"; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | statusSelect:"all", |
| | | // 状态搜索 |
| | | statusSelect: "all", |
| | | // 关键字查询 |
| | | keyWordFind:"", |
| | | searchResults: [], |
| | | //首页右侧搜索 |
| | | WupinFindValue: "", |
| | |
| | | hasUpload: true, |
| | | height: 100 |
| | | }, |
| | | result:'' |
| | | result: '' |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | created() { |
| | | const index = this.$route.query.id.indexOf('@name=') + '@name='.length; |
| | | this.result = this.$route.query.id.substring(index); |
| | | const index = this.$route.query.id.indexOf('@name=') + '@name='.length; |
| | | this.result = this.$route.query.id.substring(index); |
| | | }, |
| | | mounted() { |
| | | }, |
| | | activated() { |
| | | this.doLayout() |
| | | this.doLayout() |
| | | }, |
| | | updated() { |
| | | this.doLayout() |
| | |
| | | }, |
| | | tableDataArray: { |
| | | handler(newval, oldval) { |
| | | this.keyWordFind=''; |
| | | this.WupinFindValue='' |
| | | this.tableData = newval; |
| | | this.searchResults = newval |
| | | this.doLayout() |
| | |
| | | }, |
| | | methods: { |
| | | //状态搜索 |
| | | cellSelectHandler(row){ |
| | | if(row === 'all'){ |
| | | cellSelectHandler(row) { |
| | | if (row === 'all') { |
| | | this.cellStatusFind() |
| | | }else { |
| | | } else { |
| | | this.cellStatusFind(row) |
| | | } |
| | | }, |
| | | cellStatusFind(lcstatus){ |
| | | cellStatusFind(lcstatus) { |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | 'conditionMap[lcstatus]':lcstatus |
| | | }).then(res=>{ |
| | | 'conditionMap[lcstatus]': lcstatus |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.tableData=res.data.data |
| | | this.tableData = res.data.data |
| | | }) |
| | | }, |
| | | //展开附件 |
| | |
| | | showMessage = false; |
| | | } else if (showMessage) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length!=0) { |
| | | if (res.data.data.records && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-申请['+this.result+'-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-申请[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'PUBLIC'; |
| | | this.parameter.code=this.templateOid |
| | | this.parameter.code = this.templateOid |
| | | this.title = '流程审批' |
| | | this.visibleFlow = true; |
| | | } else { |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Released' }).then(res => { |
| | | if(res.data.code == 200 ){ |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('发布成功') |
| | | this.onLoad() |
| | | } |
| | |
| | | if (this.selectRow.length === 1 && item.lcstatus === "Disabled" && showMessage) { |
| | | this.$message.warning('选择的数据中状态无需再执行当前操作'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >=1 && !hasEditing && showMessage) { |
| | | } else if (this.selectRow.length >= 1 && !hasEditing && showMessage) { |
| | | this.$message.warning('您选择的数据全部为【发布状态】才可以发起流程'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length > 1 && hasEditing && showMessage) { |
| | | processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length!=0) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-停用['+this.result+'-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-停用[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'DISABLE'; |
| | | this.parameter.code=this.templateOid |
| | | this.parameter.code = this.templateOid |
| | | this.title = '停用(冻结)编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Disabled' }).then(res => { |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('停用成功') |
| | | this.onLoad() |
| | | } |
| | | }); |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'Disabled'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('停用成功') |
| | | this.onLoad() |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | |
| | | } |
| | | } |
| | | }); |
| | | }else { |
| | | } else { |
| | | this.$message.warning('您选择的数据为【发布状态】才可以发起流程') |
| | | } |
| | | }); |
| | |
| | | if (this.selectRow.length === 1 && item.lcstatus !== "Disabled" && showMessage) { |
| | | this.$message.warning('选择的数据中状态无需再执行当前操作'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >=1 && hasEditing && showMessage) { |
| | | processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length!=0) { |
| | | this.parameter=res.data.data.records[0] |
| | | } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length != 0) { |
| | | this.parameter = res.data.data.records[0] |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-启用['+this.result+'-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-启用[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'Released'; |
| | | this.parameter.code=this.templateOid |
| | | this.parameter.code = this.templateOid |
| | | this.title = '启用编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Released' }).then(res => { |
| | | if(res.data.code == 200 ){ |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('启用成功') |
| | | this.onLoad() |
| | | } |
| | |
| | | } |
| | | } |
| | | }); |
| | | } else if (this.selectRow.length >1 && !hasEditing && showMessage) { |
| | | } else if (this.selectRow.length > 1 && !hasEditing && showMessage) { |
| | | this.$message.warning('您选择的数据全部为【停用状态】才可以发起流程'); |
| | | showMessage = false; |
| | | } |
| | |
| | | if (this.selectRow.length === 1 && item.lcstatus == "TakeBack" && showMessage) { |
| | | this.$message.warning('选择的数据中状态无需再执行当前操作'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >=1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { |
| | | } else if (this.selectRow.length >= 1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { |
| | | //disabledCount 和 releasedCount 中任意一个等于 this.selectRow 数组的长度则表示全部是同一种状态,返回 true 如果disabledCount 和 releasedCount 都大于0,则表示既有Disabled也有Released返回 true |
| | | processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length!=0) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-回收['+this.result+'-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-回收[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'TakeBack'; |
| | | this.parameter.code=this.templateOid |
| | | this.parameter.code = this.templateOid |
| | | this.title = '回收编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: this.result, lcStatus: 'TakeBack' }).then(res => { |
| | | if(res.data.code == 200 ){ |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'TakeBack'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('回收成功') |
| | | this.onLoad() |
| | | } |
| | |
| | | } |
| | | } |
| | | }); |
| | | } else if (showMessage && this.selectRow.length >1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)) { |
| | | } else if (showMessage && this.selectRow.length > 1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)) { |
| | | this.$message.warning('您选择的数据全部为【停用状态或发布状态】才可以发起流程'); |
| | | showMessage = false; |
| | | }else if(showMessage){ |
| | | } else if (showMessage) { |
| | | this.$message.warning('您选择的数据为【停用状态或发布状态】才可以发起流程') |
| | | } |
| | | }); |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const list=[]; |
| | | this.selectRow.forEach((item)=>{list.push(item.oid)}) |
| | | deleteCode({codeClassifyOid:this.codeClassifyOid,oidList:list}).then(res=>{ |
| | | const list = []; |
| | | this.selectRow.forEach((item) => { |
| | | list.push(item.oid) |
| | | }) |
| | | deleteCode({codeClassifyOid: this.codeClassifyOid, oidList: list}).then(res => { |
| | | console.log(res) |
| | | if(res.data.code === 200){ |
| | | if (res.data.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | |
| | | this.$message.warning('输入值不能为空') |
| | | return; |
| | | } |
| | | this.tableData = this.searchResults.filter(item => { |
| | | if (typeof item.name === 'string') { |
| | | return item.name.includes(this.WupinFindValue); |
| | | } else { |
| | | return false; // item.name不是字符串类型,返回false |
| | | } |
| | | }); |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | [ 'conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*' |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.tableData = res.data.data |
| | | }) |
| | | } |
| | | |
| | | } |