田源
2023-06-19 ddd17a7643ca777f70389ae9eacb75b8dba6beab
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
ÎļþÃû´Ó Source/UBCS-WEB/src/components/Crud/Crud.vue ÐÞ¸Ä
@@ -9,7 +9,7 @@
          :codeRuleOid="this.codeRuleOid"
          :disabledProp="disabledProp"
          :templateOid="templateOid"
          :type="add"
          type="add"
          :visible.sync="addvisible"
          @submit="AddSumbit"
        >
@@ -22,7 +22,7 @@
          :disabledProp="disabledProp"
          :rowOid="rowOid"
          :templateOid="templateOid"
          :type="edit"
          type="edit"
          :title="'修改编码信息'"
          :visible.sync="editvisible"
          @submit="EditSumbit"
@@ -35,7 +35,7 @@
        <el-button plain size="small" type="primary">删除</el-button>
        <el-button plain size="small" type="primary" @click="setHandler">发布</el-button>
        <set-personnel :visible.sync="visibleFlow"  :parameter="parameter"
                       type="PUBLIC"></set-personnel>
        ></set-personnel>
        <el-button plain size="small" type="primary" @click="DataChange">数据更改</el-button>
        <FormTemplateDialog
          :codeClassifyOid="this.codeClassifyOid"
@@ -56,7 +56,14 @@
          <advanced-query :options="this.options" :visible.sync="findvisible"
                          @echoContion="echoContion"></advanced-query>
        </el-button>
        <el-button plain size="small" type="primary">相似项查询</el-button>
        <el-button plain size="small" type="primary" @click="similarHandler">相似项查询</el-button>
        <ResembleQueryDialog
          :visible.sync="similarVisible"
          :templateOid="templateOid"
          :codeClassifyOid="codeClassifyOid"
          :rowOid="rowOid"
          :codeRuleOid="this.codeRuleOid"
        ></ResembleQueryDialog>
        <el-button plain size="small" style="margin-left: 1px;margin-top:10px" type="primary">刷新</el-button>
        <el-input placeholder="请输入关键字按回车查询" size="small"
                  style="width: 180px;margin-left: 5px;margin-top:10px"></el-input>
@@ -111,11 +118,12 @@
import {listCodeAttributeByClassId} from '@/api/integration/integration.js'
import integrationTransfer from '@/views/integration/integrationTransfer'
import SetPersonnel from '@/components/template/SetPersonnel'
import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue";
export default {
  components: {
    integrationTransfer,
    SetPersonnel
    SetPersonnel,
    ResembleQueryDialog
  },
  name: "Crud.vue",
  props: {
@@ -156,12 +164,13 @@
  },
  data() {
    return {
      //相似项查询
      similarVisible:false,
      //发布
      parameter:{
        ids:['0000','22222222'],
        code:'8b5e2017-990f-454a-9c39-4c4eeeb57553',
        code:this.templateOid,
        type:'PUBLIC',
        name:'模板name',
        template:'模板template'
      },
      visibleFlow: false,
@@ -236,26 +245,10 @@
        this.page.total = newval;
      }
    },
    // tableHeadDataFateher: {
    //   handler(newval, oldval) {
    //     let List = newval.tableDefineVO.cols[0];
    //     List.forEach(item => {
    //       let columnItem = {
    //         label: item.title,
    //         prop: item.field,
    //         type: this.columnType[item.type],
    //         sortable: item.sort,
    //         width: item.minWidth
    //       };
    //       this.tableHeadData.push(columnItem);
    //       console.log('table',this.tableHeadData)
    //     })
    //   }
    // }
  },
  methods: {
    setHandler() {
      this.visibleFlow = true
      this.visibleFlow = true;
    },
    huishouHandler() {
@@ -310,21 +303,6 @@
      this.$nextTick(() => {
        this.$refs.crud.doLayout();
      });
    },
    tableHeadHandle() {
      this.options = this.tableHeadDataFateher.tableDefineVO.seniorQueryColumns
      this.List = this.tableHeadDataFateher.tableDefineVO.cols[0];
      this.List.forEach(item => {
        let columnItem = {
          label: item.title,
          prop: item.field,
          type: this.columnType[item.type],
          sortable: item.sort,
          width: item.minWidth
        };
        this.option.column.push(columnItem);
        this.option.column = this.tableHeadData;
      })
    },
    //表格头渲染
    CrudHeaderRend() {
@@ -401,7 +379,11 @@
    },
    //多选
    handleSelectionChange(row) {
      this.rowOid = row[0].oid;
      if(this.row){
        this.rowOid = row[0].oid;
      }else {
        this.rowOid=''
      }
      this.selectRow = row;
      console.log(row)
    },
@@ -435,6 +417,17 @@
        console.log(res)
      })
    },
    //相似项查询
    similarHandler(){
      if (this.selectRow.length <= 0) {
        this.$message.warning('请选择一条数据')
      } else if (this.selectRow.length > 1) {
        this.$message.warning('只能选择一条数据')
      }  else {
        this.similarVisible=true;
      }
    },
    //数据更改
    DataChange(){
      if (this.selectRow.length <= 0) {