| | |
| | | </ul> |
| | | <div |
| | | class="radio_box" |
| | | v-show="currentTypeObj[type]['upParams'] === 'classifyAttr'" |
| | | v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'" |
| | | > |
| | | <span>分类的路径使用的属性:</span> |
| | | <el-radio-group v-model="classifyAttr"> |
| | |
| | | size="small" |
| | | @click="downloadTemplateFun" |
| | | :loading="downloadLoading" |
| | | >下载导入模板</el-button |
| | | > |
| | | v-if="type !== 'bulkEdit'" |
| | | >下载导入模板</el-button> |
| | | <el-button type="primary" |
| | | size="small" |
| | | :loading="downloadLoading" |
| | | @click="downloadTemplateFun" |
| | | v-if="type === 'bulkEdit'" |
| | | >下载编辑模板</el-button> |
| | | <el-button size="small" @click="dialogVisible = false">关闭</el-button> |
| | | </template> |
| | | <ShowImportData |
| | |
| | | downloadBatchImportApplyTemplate, |
| | | downloadBatchApplyCodeTemplate, |
| | | } from "../../api/batchImport/index"; |
| | | import {exportCode} from '@/api/GetItem' |
| | | import func from "@/util/func"; |
| | | import FormTemplate from "../FormTemplate/FormTemplate.vue"; |
| | | import { getToken } from "@/util/auth"; |
| | | import codeApply from "@/mixins/codeApply.js"; |
| | |
| | | type: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | tableHeadFindData:{ |
| | | type:Array, |
| | | default:[] |
| | | }, |
| | | selectRow:{ |
| | | type:Array, |
| | | default:[] |
| | | }, |
| | | resetTable: Function |
| | | }, |
| | |
| | | return this.currentTypeObj[this.type]["action"]; |
| | | }, |
| | | upParams() { |
| | | if (this.type === "historyImport" || this.type === "batchApplyCode") { |
| | | if (this.type === "historyImport" || this.type === "batchApplyCode" || this.type === "bulkEdit") { |
| | | return { |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | classifyAttr: this.classifyAttr, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | exportArrTwo: {}, |
| | | classifyAttr: "id", |
| | | downloadLoading: false, |
| | | showVisible: false, |
| | |
| | | "2.企业编码,集团码和状态都需要导入", |
| | | "3.每次仅能最多导入5000条数据(可通过nacos进行配置,推荐5000/次导入),如果出错会返回错误的数据和原因,但是正确数据可以继续保存", |
| | | "4.分类的路径需要用#分隔。仅填写当前选的分类树上的下级分类的路径,如果当前分类已经是叶子节点,则不填写", |
| | | ], |
| | | action: "/api/ubcs-code/mdmEngineController/batchImportHistoryData", |
| | | downloadTemplateFun: downloadHistoryImportTemplate, |
| | | upParams: "classifyAttr", |
| | | }, |
| | | bulkEdit:{ |
| | | title: "批量编辑导入", |
| | | tipList: [ |
| | | "1.标题带五角星的表示关键属性,带星号表示必输项", |
| | | "2.每次仅能最多导入5000条数据(可通过nacos进行配置,推荐5000/次导入),如果出错会返回错误的数据和原因,但是正确数据可以继续保存", |
| | | "3.请按照下载的编辑模板所使用的配置进行具体配置" |
| | | ], |
| | | action: "/api/ubcs-code/mdmEngineController/batchImportHistoryData", |
| | | downloadTemplateFun: downloadHistoryImportTemplate, |
| | |
| | | }, |
| | | // 下载导入模板 |
| | | downloadTemplateFun() { |
| | | if(this.type !== 'bulkEdit'){ |
| | | this.downloadLoading = true; |
| | | this.downloadTemplateApi({ |
| | | codeClassifyOid: this.codeClassifyOid, |
| | |
| | | .catch(() => { |
| | | this.downloadLoading = false; |
| | | }); |
| | | return; |
| | | } |
| | | if(this.type === 'bulkEdit'){ |
| | | this.tableHeadFindData.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.$message.success('下载成功,请查看!') |
| | | } |
| | | }) |
| | | return; |
| | | } |
| | | }, |
| | | onSuccess(res) { |
| | | if (Object.keys(res.data).length === 0) { |
| | |
| | | this.TableRend(); // TableHeadRend() 方法完成后再执行 TableRend() |
| | | this.$emit('nodeClick', this.templateOids) |
| | | this.$emit("codeClassifyOid", this.nodeClickList.oid) |
| | | this.$emit("nodeClickList", this.nodeClickList) |
| | | } catch (error) { |
| | | // 处理错误 |
| | | this.$message.error(error) |
| | |
| | | :visible.sync="editvisible" |
| | | type="edit" @submit="EditSumbit"></FormTemplateDialog> |
| | | <!-- 批量编辑--> |
| | | <MasterEditBulk :visible.sync="bulkeditvisible" ></MasterEditBulk> |
| | | <!-- <MasterEditBulk :visible.sync="bulkeditvisible" ></MasterEditBulk>--> |
| | | <!-- 数据详情--> |
| | | <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" |
| | | :rowOid="this.LinkObject.oid" :templateOid="templateOid" |
| | |
| | | :tableData="tableData" |
| | | :tableHeadData="tableHeadFindData" :templateOid="templateOid" |
| | | :visible.sync="dialogPush"></MasterTransfer> |
| | | <!-- 导入--> |
| | | <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :resetTable="CrudRend" |
| | | :visible.sync="batchImportData.visible" :tableHeadData="tableHeadFindData" :selectRow="selectRow"> |
| | | </BatchImport> |
| | | <!-- 相似项--> |
| | | <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid" |
| | | :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog> |
| | |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <!-- 导入--> |
| | | <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :resetTable="CrudRend" |
| | | :visible.sync="batchImportData.visible"> |
| | | </BatchImport> |
| | | </div> |
| | | <div class="bottom"> |
| | | <el-collapse v-model="visibleNames" @change="handleCollapse"> |
| | |
| | | Treedata: { |
| | | type: Array |
| | | }, |
| | | |
| | | nodeClickList:{ |
| | | type:Array, |
| | | default:[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // 标准修订 |
| | | if (uniqueFlag === 'CODEAMEND') return this.codeAMENDHandler() |
| | | //批量编辑 |
| | | if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler() |
| | | if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler("bulkEdit") |
| | | }); |
| | | }, |
| | | //标准申请 |
| | |
| | | } |
| | | }, |
| | | //批量编辑 |
| | | bulkEditHandler(){ |
| | | bulkEditHandler(type){ |
| | | console.log(this.nodeClickList) |
| | | if(this.nodeClickList.children.length >= 1){ |
| | | this.$message.warning('当前选择的分类不是叶子节点,不允许批量编辑!') |
| | | return; |
| | | } |
| | | if(this.selectRow.length <= 0){ |
| | | this.$message.warning('请选择至少一条数据!') |
| | | return; |
| | |
| | | const Editing = this.selectRow.every(item => item.lcstatus === 'Editing'); |
| | | |
| | | if (Editing) { |
| | | this.bulkeditvisible = true; |
| | | this.batchImportData.visible = true |
| | | this.batchImportData.type = type |
| | | this.batchImportData.codeClassifyOid = this.codeClassifyOid |
| | | } else { |
| | | this.$message.warning('选择的数据中有编码状态不是“编辑中”,不可编辑!'); |
| | | } |
| | |
| | | // const requestData = this.selectRow.forEach(item => { |
| | | // return { oids: item.oid, btmName: item.btmname }; |
| | | // }); |
| | | |
| | | const oids = this.selectRow.map(item => item.oid).join(','); |
| | | applyGroupCode({oids, btmName: this.selectRow[0].btmname}).then(res => { |
| | | if (res.data.code == 200) { |
| | |
| | | @tableHeadBttoms="tableHeadBttoms" |
| | | @tableHeadDataFateher="tableHeadDatas" |
| | | @tableHeadFindData="tableHeadFindDatas" |
| | | @nodeClickList="nodeClickLists" |
| | | @total="totals" |
| | | > |
| | | </master-tree> |
| | |
| | | :tableHeadFindData="tableHeadFindData" |
| | | :templateOid="templateOid" |
| | | :total="this.total" |
| | | :nodeClickList="this.nodeClickList" |
| | | @currentPage="currentPages" |
| | | @pageSize="pageSizes" |
| | | > |
| | |
| | | total: "", |
| | | isLoading: false, |
| | | tableHeadFindData: {}, |
| | | TreeValue: '' |
| | | TreeValue: '', |
| | | nodeClickList:[] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | nodeClickLists(val){ |
| | | this.nodeClickList=val; |
| | | }, |
| | | TreeValueEmit(val) { |
| | | this.TreeValue = val |
| | | }, |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //本地服务接口地址 |
| | | target: 'http://127.0.0.1:37000', |
| | | // target: 'http://127.0.0.1:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | //yxc |
| | | // target: 'http:// 192.168.0.104:37000', |
| | | // target: 'http://192.168.0.105:37000', |