| | |
| | | data:data |
| | | }) |
| | | } |
| | | //11-28 flowingDependencyGen 接口测试 |
| | | export const flowingDependencyGen = (classifyOid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/flowingDependencyGen', |
| | | method: 'get', |
| | | params:{ |
| | | classifyOid |
| | | } |
| | | }) |
| | | } |
| | | //基本信息表单数据 |
| | | export const getObjectByOid = (oid) =>{ |
| | | return request({ |
| | |
| | | }, |
| | | eventList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | status: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | filteredObject: {}, |
| | | filteredArray: [], |
| | | isSeriesType: {}, |
| | | attrList: [], |
| | | add: '', |
| | | codeattrsecValue: '', |
| | |
| | | // 表单属性 |
| | | attributes: [], |
| | | slotColumnList: [], |
| | | isShow:null, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | immediate: true, |
| | | handler(newV) { |
| | | this.$emit("getFormData", newV); |
| | | // console.log("filteredObject",this.filteredObject) |
| | | if (this.filteredObject.label === "系列号") { |
| | | if (newV.isSeries === "false") { |
| | | this.filteredObject.disabled = true; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | attrList: { |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.$emit("attrList", newVal) |
| | | } |
| | | } |
| | | }, |
| | | isSeriesType: { |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.$emit("isSeriesType", newVal) |
| | | } |
| | | } |
| | | }, |
| | |
| | | methods: { |
| | | // 渲染表单模板 |
| | | templateRender(formItemList, TreeValue) { |
| | | // debugger |
| | | if (this.eventList) { |
| | | this.eventFlag = this.eventList.some(item => { |
| | | if (item.classifyInvokeEditFlag === 'true') { |
| | |
| | | let dictKeys = []; |
| | | let slotColumnList = []; |
| | | formItemList.forEach((formItem) => { |
| | | console.log('formItem',formItem) |
| | | console.log('formItem',formItem); |
| | | formItem = this.resetFormConfig(formItem); |
| | | //属性码段规则 |
| | | if (formItem.secType === "codeattrsec") { |
| | | this.attrList.push(formItem); |
| | | } |
| | | //系列号规则 |
| | | if (formItem.label === "系列号") { |
| | | this.isSeriesType = formItem; |
| | | // console.log("系列号",formItem) |
| | | } |
| | | //更改方式规则 |
| | | if (formItem.field === "codeStandardEditType") { |
| | | if (this.status === "amend") { |
| | | formItem.readOnly = true; |
| | | } |
| | | } |
| | | if (formItem.type === "line") { |
| | | group.push({ |
| | |
| | | |
| | | let columnItem = { |
| | | change: (val) => { |
| | | // console.log(val) |
| | | if (val.column.field === "drawingno") { |
| | | this.codeattrsecValue = val.value; |
| | | return; |
| | | } |
| | | // console.log(this.codeattrsecValue) |
| | | ; |
| | | if (val.column.field === "isSeries") { |
| | | if (val.value === "false") { |
| | | this.isShow = true; |
| | | }else { |
| | | this.isShow = false; |
| | | } |
| | | } |
| | | |
| | | }, |
| | | dataKey: formItem.dataKey || formItem.field, |
| | | label: formItem.text, |
| | |
| | | field: formItem.field, |
| | | type: this.columnType[formItem.type], |
| | | dicData: this.getDataList(formItem.type, formItem.data), |
| | | disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false), |
| | | disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false) || |
| | | (this.isShow && formItem.label === "系列号" ? true : false), |
| | | prepend: this.preOrSufFixShow("text", formItem.prefix), |
| | | append: this.preOrSufFixShow("text", formItem.suffix), |
| | | prefixIcon: this.preOrSufFixShow("icon", formItem.prefix), |
| | |
| | | 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), |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (formItem.field === "isSeries" ? "true" : null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | |
| | | value: "key", |
| | | }, |
| | | }; |
| | | this.filteredObject = columnItem |
| | | // console.log("columnItem", columnItem) |
| | | slotColumnList.push(columnItem); |
| | | if (group.length === 0) { |
| | | column.push(columnItem); |
| | |
| | | group[group.length - 1]["column"].push(columnItem); |
| | | } |
| | | }); |
| | | |
| | | // this.filteredArray = column.filter(obj => obj.label === "系列号"); |
| | | this.slotColumnList = slotColumnList; |
| | | // console.log(slotColumnList) |
| | | this.$set(this.option, "column", column); |
| | | this.$set(this.option, "group", group); |
| | | this.updateIndex++; |
| | |
| | | } |
| | | let columnItem = { |
| | | change: (val) => { |
| | | console.log('1', val) |
| | | // console.log('1', val) |
| | | }, |
| | | label: formItem.text, |
| | | labelslot: true, |
| | |
| | | > |
| | | <FormTemplate |
| | | key="masterForm" data-key="masterForm" |
| | | :status="status" |
| | | v-bind="$attrs" |
| | | :type="type" |
| | | :TreeValue="TreeValue" |
| | |
| | | ref="CodeApply" |
| | | @getFormData="getCodeApplyFormData" |
| | | @attrList="attrListForm" |
| | | @isSeriesType="isSeriesTypeString" |
| | | @referConfigDataUpdate="referConfigDataUpdate" |
| | | ></FormTemplate> |
| | | </el-tab-pane> |
| | |
| | | name: "FormTemplateDialog", |
| | | components: { ResembleQuery, FormTemplate }, |
| | | props: { |
| | | status:{ |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | visible: { |
| | | type: Boolean, |
| | | default: false, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isSeriesType:{}, |
| | | attrList:[], |
| | | eventList:[], |
| | | //码值的第二种只读隐藏情况 |
| | |
| | | }); |
| | | }, |
| | | getFormData(form) { |
| | | // if (this.status === "apply"){ |
| | | // form.codeStandardEditType = "制定"; |
| | | // return; |
| | | // } |
| | | this.form = form; |
| | | // console.log("form",form) |
| | | //属性码段赋值 |
| | | if (this.attrList) { |
| | | this.attrList.forEach(item => { |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | isSeriesTypeString(val){ |
| | | this.isSeriesType = val; |
| | | }, |
| | | //属性码段赋值 |
| | | attrListForm(attrListForm){ |
| | | this.attrList=attrListForm; |
| | | }, |
| | | getCodeApplyFormData(codeApplyForm) { |
| | | // console.log("codeApplyForm",codeApplyForm) |
| | | this.codeApplyForm = codeApplyForm; |
| | | }, |
| | | // 参照组件数据变更 |
| | |
| | | <!-- 申请--> |
| | | <FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" :disabledProp="disabledProp" :templateOid="templateOid" |
| | | :visible.sync="applyvisible" |
| | | :visible.sync="applyvisible" status="apply" |
| | | type="add" |
| | | @submit="applySumbit"> |
| | | </FormTemplateDialog> |
| | | <!-- 修订--> |
| | | <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'修改编码信息'" |
| | | :visible.sync="amendvisible" |
| | | :visible.sync="amendvisible" status="amend" |
| | | type="edit" @submit="amendSumbit"></FormTemplateDialog> |
| | | <!-- 新增--> |
| | | <FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid" |
| | |
| | | } |
| | | } |
| | | this.isReferPushed = true; |
| | | console.log('new', this.referArray) |
| | | console.log('ss', newval.find(item => Object.keys(item.referConfig).length > 0)) |
| | | this.WupinFindValue = '' |
| | | }, |
| | | }, |
| | |
| | | <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">添加 |
| | | <div style="display: flex;justify-content: space-around"> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="mini" type="primary" @click="TreeAdd">添加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改 |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="mini" type="primary" @click="TreeEdit">修改 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">刷新 |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="mini" type="primary" @click="TreeDel">删除 |
| | | </el-button> |
| | | </div> |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">启用 |
| | | <div style="display: flex; margin-top: 10px;justify-content: space-around"> |
| | | <el-button v-if="permissionList.flushedStatus" plain size="mini" type="primary" @click="flushed">刷新 |
| | | </el-button> |
| | | <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate"> |
| | | <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="small" type="primary" |
| | | </div> |
| | | <div style="display: flex; margin-top: 10px;justify-content: space-around"> |
| | | <el-button v-if="permissionList.ImportExcelStatus" plain size="mini" type="primary" |
| | | @click.native="ImportExcel">导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" |
| | | @click="ExportExcel">导出 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" |
| | | @click="testHandler">测试 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | |
| | | upVersion, |
| | | stopLose, |
| | | startRelease, |
| | | exportClassify |
| | | exportClassify, |
| | | flowingDependencyGen |
| | | } from "@/api/template/templateAttr"; |
| | | import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' |
| | | import func from "@/util/func"; |
| | |
| | | created() { |
| | | }, |
| | | methods: { |
| | | testHandler(){ |
| | | if(this.nodeClickList.length <=0 ){ |
| | | this.$message.warning('请至少选择一条数据!') |
| | | return; |
| | | } |
| | | console.log(this.nodeClickList.oid) |
| | | flowingDependencyGen(this.nodeClickList.oid).then(res => { |
| | | this.$message.success('操作成功') |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | // switch |
| | | switchChange() { |
| | | this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0; |