Merge remote-tracking branch 'origin/master'
| | |
| | | > |
| | | </el-upload> |
| | | <template #footer> |
| | | <div v-if="type !== 'groupCode'"> |
| | | <el-button |
| | | v-if="type !== 'bulkEdit' " |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载导入模板 |
| | | </el-button> |
| | | <el-button v-if="type === 'bulkEdit'" |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载编辑模板 |
| | | </el-button> |
| | | </div> |
| | | <el-button size="small" @click="dialogVisible = false">关闭</el-button> |
| | | <div style="display: inline-block"> |
| | | <el-button |
| | | v-if="type !== 'bulkEdit' " |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载导入模板 |
| | | </el-button> |
| | | <el-button v-if="type === 'bulkEdit'" |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载编辑模板 |
| | | </el-button> |
| | | </div> |
| | | <div style="display: inline-block"> |
| | | <el-button size="small" @click="dialogVisible = false">关闭</el-button> |
| | | </div> |
| | | |
| | | </template> |
| | | <ShowImportData |
| | | v-if="showVisible" |
| | |
| | | return this.currentTypeObj[this.type]["action"]; |
| | | }, |
| | | upParams() { |
| | | if (this.type === "historyImport" || this.type === "batchApplyCode" ) { |
| | | if (this.type === "historyImport" || this.type === "batchApplyCode") { |
| | | return { |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | classifyAttr: this.classifyAttr, |
| | |
| | | return { |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | }; |
| | | }else if(this.type === 'groupCode'){ |
| | | } else if (this.type === 'groupCode') { |
| | | return { |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | }; |
| | |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | selectRow:{ |
| | | type:Array, |
| | | default:[] |
| | | selectRow: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | selectValue:"", |
| | | selectValue: "", |
| | | //年代号 |
| | | dataYearCode: { |
| | | type: "", |
| | |
| | | } |
| | | }, |
| | | dataYearCode: { |
| | | deep:true, |
| | | immediate:true, |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newV) { |
| | | this.$emit("dataYearCode", newV) |
| | | } |
| | | }, |
| | | selectRow:{ |
| | | handler(newval){ |
| | | selectRow: { |
| | | handler(newval) { |
| | | console.log(newval); |
| | | let ids = newval.map(item => item.id); |
| | | this.selectValue= ids.join(","); |
| | | this.selectValue = ids.join(","); |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | deep: true, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | //系列号规则 |
| | | if (formItem.field === "codeStandardEditType") { |
| | | if (this.status === "amend") { |
| | | console.log("formItem-amend",formItem) |
| | | console.log("formItem-amend", formItem) |
| | | formItem.readOnly = true; |
| | | } |
| | | } |
| | |
| | | valueFormat: formItem.dateFormate || "yyyy-MM-dd HH:mm:ss", |
| | | format: formItem.dateFormate, |
| | | keyAttr: formItem.keyAttr, |
| | | value:formItem.defaultValue || (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | value: formItem.defaultValue || (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null) || |
| | | //父组件如果是参照数据会将selectRow置空,selectRow不为空就说明不是参照要回填源标准号数据 |
| | | (this.status === "amend" ? (this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)) : null), |
| | | (this.status === "amend" ? (this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)) : null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | |
| | | keyAttr: formItem.keyAttr, |
| | | value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | |
| | | // 获取表单详情数据 |
| | | getFormDetail() { |
| | | if (this.type === "add") return; |
| | | if(this.templateOid){ |
| | | if (this.templateOid) { |
| | | getFormDetail({templateOid: this.templateOid, oid: this.rowOid}).then( |
| | | (res) => { |
| | | this.form = Object.assign(this.form, res.data.data[0]); |
| | |
| | | v-if="dialogVisible" key="masterForm" |
| | | ref="FormTemplate" |
| | | v-bind="$attrs" |
| | | :selectRow="selectRow" |
| | | :TreeValue="TreeValue" |
| | | :eventList="eventList" |
| | | :rowOid="rowOid" |
| | | :selectRow="selectRow" |
| | | :status="status" |
| | | :templateOid="templateOid" |
| | | :type="type" |
| | |
| | | <el-tab-pane v-if="showCodeApply" label="码值申请" name="codeApply"> |
| | | <FormTemplate |
| | | key="codeApplyForm" ref="CodeApply" |
| | | :selectRow="selectRow" |
| | | :selfColumnConfig="selfColumnConfig" |
| | | :selfColumnType="selfColumnType" |
| | | :type="type" |
| | | :status="status" |
| | | :selectRow="selectRow" |
| | | :type="type" |
| | | data-key="codeApplyForm" |
| | | secDTOListv-bind="$attrs" |
| | | @attrList="attrListForm" |
| | |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | selectRow:{ |
| | | type:Array, |
| | | default:[] |
| | | selectRow: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | }, |
| | | }, |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | | openDialog() { |
| | | //新增和修改共同调用(有改动 不需要在使用edit,方法没什么影响) |
| | |
| | | that.secVOList = (res.data.data.secVOList || []).filter((item) => |
| | | typeList.includes(item.secType) |
| | | ); |
| | | if (that.secVOList.length > 0 && that.type === "add" ||(that.type !== "add" && that.status === "amend")) { |
| | | if (that.secVOList.length > 0 && that.type === "add" || (that.type !== "add" && that.status === "amend")) { |
| | | that.showCodeApply = true; |
| | | that.activeName = "codeApply"; |
| | | |
| | |
| | | } |
| | | }, |
| | | async submit() { |
| | | if(this.status){ |
| | | if (this.status) { |
| | | // 进行表单校验 |
| | | const formValidate = await this.$refs.FormTemplate.validate(); |
| | | if (!formValidate) return; |
| | |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | this.$emit("submit", resForm); |
| | | }else { |
| | | } else { |
| | | // 进行表单校验 |
| | | const formValidate = await this.$refs.FormTemplate.validate(); |
| | | if (!formValidate) return; |
| | |
| | | <el-radio :label="1">全部</el-radio> |
| | | <el-radio :label="2">页码</el-radio> |
| | | </el-radio-group> |
| | | <span v-if="radio === 2" style="margin-left: 20px;"><el-input v-model="pageExport" style="width: 150px"></el-input> (输入页码或者页面范围,如:1-10)</span> |
| | | <span v-if="radio === 2" style="margin-left: 20px;"><el-input v-model="pageExport" |
| | | style="width: 150px"></el-input> (输入页码或者页面范围,如:1-10)</span> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center"> |
| | |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | handlerFile(res){ |
| | | handlerFile(res) { |
| | | let reader = new FileReader(); |
| | | reader.readAsText(res.data); |
| | | reader.onload = (result) =>{ |
| | | reader.onload = (result) => { |
| | | try { |
| | | let resData = JSON.parse(result.target.result); // 解析对象成功 |
| | | if (resData.code != 200) { |
| | |
| | | 'conditionMap[oid]': this.ids, ...this.exportArrTwo, |
| | | limit: -1 |
| | | }).then(res => { |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | }) |
| | | } else { |
| | | |
| | |
| | | 'conditionMap[oid]': this.ids, ...this.exportArr |
| | | }).then(res => { |
| | | // console.log('res',res) |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | |
| | | }) |
| | | |
| | |
| | | }) |
| | | } else { |
| | | exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: -1}).then(res => { |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | }) |
| | | } |
| | | } else if (this.radio === 2) { |
| | |
| | | endPage: end |
| | | }).then((res) => { |
| | | // console.log('res',res) |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | |
| | | }); |
| | | } else { |
| | |
| | | page: start, |
| | | endPage: end |
| | | }).then(res => { |
| | | console.log('res',res) |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | console.log('res', res) |
| | | this.handlerFile(res); |
| | | this.escHandler(); |
| | | }) |
| | | } |
| | | } |
| | |
| | | }).then(res => { |
| | | let reader = new FileReader(); |
| | | reader.readAsText(res.data) |
| | | reader.onload = (result) =>{ |
| | | reader.onload = (result) => { |
| | | try { |
| | | let resData = JSON.parse(result.target.result); // 解析对象成功 |
| | | if (!resData.success) { |
| | | console.log("resData",resData) |
| | | console.log("resData", resData) |
| | | this.$message.error(resData.msg); |
| | | this.isLoading = false; |
| | | } |
| | |
| | | <template> |
| | | <el-container> |
| | | <!-- 左侧菜单--> |
| | | <el-aside style="width: 20%;"> |
| | | <el-aside> |
| | | <basic-container> |
| | | <el-collapse accordion> |
| | | <el-collapse-item style="padding-left: 3px;"> |
| | | <template slot="title"> |
| | | <div style="display: flex;justify-content: space-around;"> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="mini" type="primary" @click="TreeAdd">添加 |
| | | <div> |
| | | <div> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <div style="display: flex;"> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">添加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="mini" type="primary" @click="TreeEdit">修改 |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="mini" type="primary" @click="TreeDel">删除 |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.flushedStatus" plain size="mini" type="primary" @click="flushed">刷新 |
| | | <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">刷新 |
| | | </el-button> |
| | | </div> |
| | | </template> |
| | | <div> |
| | | <el-button v-if="permissionList.EnableStatus" plain size="mini" type="primary" @click="Enable">启用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.DeactivateStatus" plain size="mini" type="primary" @click="Deactivate"> |
| | | 停用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ImportExcelStatus" plain size="mini" type="primary" |
| | | @click.native="ImportExcel">导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" |
| | | @click="ExportExcel">导出 |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">启用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate"> |
| | | 停用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" |
| | | @click.native="ImportExcel">导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" |
| | | @click="ExportExcel">导出 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;margin-top: 5px;margin-bottom: 5px"> |
| | | <el-button v-if="permissionList.flowingBtnStuatus" plain size="mini" type="primary" @click="testHandler">流水处理 |
| | | </el-button> |
| | | </div> |
| | | <div style="margin-top: 10px;margin-bottom: 10px"> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" @click="testHandler">流水处理 |
| | | </el-button> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- 左侧树--> |
| | | <div style="height: calc(100vh - 194px);overflow: auto;"> |
| | | <div style="height: calc(100vh - 230px);overflow: auto"> |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" |
| | | :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | class="classifyTree" |
| | | style="height: calc(100vh - 280px);" |
| | | style="height: calc(100vh - 280px)" |
| | | @node-click="nodeClick" |
| | | > |
| | | </avue-tree> |
| | |
| | | FindStatus: this.vaildData(this.permission.classifyTree.manage_search, false), |
| | | TemRefreshStatus: this.vaildData(this.permission.classifyTree.manage_break, false), |
| | | CloneBtnStuatus: this.vaildData(this.permission.classifyTree.manage_clone, false), |
| | | flowingBtnStuatus: this.vaildData(this.permission.classifyTree.tree_flowing, false), |
| | | } |
| | | }, |
| | | crudTreeOption() { |
| | |
| | | </div> |
| | | </el-header> |
| | | <el-container> |
| | | <el-aside width="240px"> |
| | | <el-aside style="width:250px"> |
| | | <basic-container class="businessTreeContainer"> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">{{ treeOption.title }}</p> |
| | | <avue-tree id="basic" :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick"> |
| | | <div class="app"> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">{{ treeOption.title }}</p> |
| | | <avue-tree id="basic" :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span> |
| | | <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </avue-tree> |
| | | </div> |
| | | |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-container> |
| | |
| | | </avue-crud> |
| | | <!-- 从其他菜单克隆按钮 --> |
| | | <el-dialog :visible.sync="cloneOtherMenuButtons.cloneButtonSettingBox" |
| | | class="avue-dialog avue-dialog--top" |
| | | top="0" |
| | | append-to-body |
| | | class="avue-dialog avue-dialog--top" |
| | | style="height: 110vh; margin-top: -10vh;" |
| | | title="从其他菜单克隆按钮" |
| | | top="0" |
| | | width="1100px" |
| | | @close="cleanCloneSelections"> |
| | | <avue-crud ref="cloneCrud" |
| | |
| | | label: "菜单名称", |
| | | prop: "name", |
| | | search: true, |
| | | width:220, |
| | | width: 220, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | viewBtn: this.vaildData(this.permission.menu.menu_view, false), |
| | | delBtn: this.vaildData(this.permission.menu.menu_delete, false), |
| | | editBtn: this.vaildData(this.permission.menu.menu_edit, false), |
| | | cloneBtn: this.vaildData(this.permission.menu.menu_clone,false), |
| | | addChildBtn: this.vaildData(this.permission.menu.menu_add_child,false), |
| | | cloneBtn: this.vaildData(this.permission.menu.menu_clone, false), |
| | | addChildBtn: this.vaildData(this.permission.menu.menu_add_child, false), |
| | | }; |
| | | |
| | | }, |
| | |
| | | url: ${ubcs.datasource.mdm.prod.url} |
| | | username: ${ubcs.datasource.mdm.prod.username} |
| | | password: ${ubcs.datasource.mdm.prod.password} |
| | | #关闭驼峰命名映射 |
| | | mybatis-plus: |
| | | configuration : |
| | | map-underscore-to-camel-case: false |
| | |
| | | */ |
| | | @GetMapping("/exportGroupCodeExcel") |
| | | @VciBusinessLog(operateName = "导出集团码") |
| | | public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ |
| | | public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response){ |
| | | try { |
| | | String excelName = mdmIOService.exportGroupCodeExcel(codeClassifyOid); |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | |
| | | if(StringUtils.isBlank(msg)){ |
| | | msg = "未知错误"; |
| | | } |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt"; |
| | | LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile); |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,errorFile); |
| | | } catch (IOException ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | String uuid=ControllerUtil.putErrorFile(errorFile); |
| | | return R.fail(msg); |
| | | // ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | } |