| | |
| | | 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; |
| | | } |
| | |
| | | </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), |
| | | }; |
| | | |
| | | }, |