田源
2023-11-28 6b9c331b4499f463717c0ec64a8090d9a96ca7d7
主数据申请-修订 主题库测试按钮
已修改5个文件
141 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/template/templateAttr.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/template/templateAttr.js
@@ -112,6 +112,16 @@
    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({
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -98,10 +98,17 @@
    },
    eventList: {
      type: Array
    }
    },
    status: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      filteredObject: {},
      filteredArray: [],
      isSeriesType: {},
      attrList: [],
      add: '',
      codeattrsecValue: '',
@@ -132,6 +139,7 @@
      // 表单属性
      attributes: [],
      slotColumnList: [],
      isShow:null,
    };
  },
  mounted() {
@@ -162,15 +170,29 @@
      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)
        }
      }
    },
@@ -187,6 +209,7 @@
  methods: {
    // 渲染表单模板
    templateRender(formItemList, TreeValue) {
      // debugger
      if (this.eventList) {
        this.eventFlag = this.eventList.some(item => {
          if (item.classifyInvokeEditFlag === 'true') {
@@ -201,10 +224,22 @@
      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({
@@ -249,10 +284,20 @@
        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,
@@ -263,7 +308,8 @@
          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),
@@ -273,7 +319,8 @@
          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,
@@ -316,6 +363,8 @@
            value: "key",
          },
        };
        this.filteredObject = columnItem
        // console.log("columnItem", columnItem)
        slotColumnList.push(columnItem);
        if (group.length === 0) {
          column.push(columnItem);
@@ -323,7 +372,10 @@
          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++;
@@ -361,7 +413,7 @@
        }
        let columnItem = {
          change: (val) => {
            console.log('1', val)
            // console.log('1', val)
          },
          label: formItem.text,
          labelslot: true,
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -12,6 +12,7 @@
  >
    <FormTemplate
      key="masterForm" data-key="masterForm"
      :status="status"
      v-bind="$attrs"
      :type="type"
      :TreeValue="TreeValue"
@@ -42,6 +43,7 @@
            ref="CodeApply"
            @getFormData="getCodeApplyFormData"
            @attrList="attrListForm"
            @isSeriesType="isSeriesTypeString"
            @referConfigDataUpdate="referConfigDataUpdate"
          ></FormTemplate>
        </el-tab-pane>
@@ -92,6 +94,10 @@
  name: "FormTemplateDialog",
  components: { ResembleQuery, FormTemplate },
  props: {
    status:{
      type: String,
      default: "",
    },
    visible: {
      type: Boolean,
      default: false,
@@ -132,6 +138,7 @@
  },
  data() {
    return {
      isSeriesType:{},
      attrList:[],
      eventList:[],
      //码值的第二种只读隐藏情况
@@ -319,7 +326,12 @@
      });
    },
    getFormData(form) {
      // if (this.status === "apply"){
      //   form.codeStandardEditType = "制定";
      //   return;
      // }
      this.form = form;
      // console.log("form",form)
      //属性码段赋值
      if (this.attrList) {
        this.attrList.forEach(item => {
@@ -328,12 +340,17 @@
          }
        })
      }
    },
    isSeriesTypeString(val){
      this.isSeriesType = val;
    },
    //属性码段赋值
    attrListForm(attrListForm){
      this.attrList=attrListForm;
    },
    getCodeApplyFormData(codeApplyForm) {
      // console.log("codeApplyForm",codeApplyForm)
      this.codeApplyForm = codeApplyForm;
    },
    // 参照组件数据变更
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -90,14 +90,14 @@
          <!--          申请-->
          <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"
@@ -455,8 +455,6 @@
          }
        }
        this.isReferPushed = true;
        console.log('new', this.referArray)
        console.log('ss', newval.find(item => Object.keys(item.referConfig).length > 0))
        this.WupinFindValue = ''
      },
    },
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -7,27 +7,32 @@
        <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>
@@ -423,7 +428,8 @@
  upVersion,
  stopLose,
  startRelease,
  exportClassify
  exportClassify,
  flowingDependencyGen
} from "@/api/template/templateAttr";
import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master'
import func from "@/util/func";
@@ -879,6 +885,18 @@
  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;