田源
2023-09-18 fb4cb0e61775b2df5e493ad4ca19402d76f8bc6f
Source/UBCS-WEB/src/views/docking/data.vue
@@ -8,18 +8,22 @@
               :permission="permissionList"
               ref="crud"
               @search-change="searchChange"
               @cell-dblclick="cellDbClick"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot-scope="scope" slot="menuLeft">
        <vci-docking-search :SearchObject="SearchObject" :page="page" :formInline="formInline" :status="status" @getList="dockingGetList"></vci-docking-search>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
import {getList} from "@/api/docking/data";
import {getDataList} from "@/api/docking/data";
import {validatenull} from "@/util/validate";
import {mapGetters} from "vuex";
import website from "@/config/website";
@@ -28,6 +32,50 @@
name: "data",
  data(){
  return {
    //各个类型状态
    status:{
      type:'data',
      sendTypeFlga:false,
      stateTaskDataFlag:false
    },
    //model绑定
    formInline:{
      type:'',
      text:'',
      stateTask:'',
      taskCut:''
    },
    //集成类型死数据
    SearchObject:{
      searchData:[
        {
          label:'数据编码',
          prop: "id",
          value:0
        },
        {
          label:'分类代号',
          prop: "classifyId",
          value:1
        },
        {
          label:'分类名称',
          prop: 'classifyName',
          value:2
        },
        {
          label:'推送类型',
          prop: 'sendType',
          value:3
        },
        {
          label:'是否分解任务',
          prop: 'sendFlag',
          value:4
        },
      ]
    },
    value:'',
    loading: false,
    query: {},
    selectionList: [],
@@ -55,52 +103,63 @@
          prop: "id",
          search: true,
          sortable:true,
          width:150
          // width:150
        },
        {
          label: "图号",
          prop: "uniquecode",
          prop: "uniqueCode",
          search: true,
          hide:true,
          sortable:true
        },
        {
          label: '分类id',
          prop: 'classifyid',
          label: '分类代号',
          prop: 'classifyId',
          search: true,
          sortable:true,
          width: 250
          // width: 250
        },
        {
          label: '分类名称',
          prop: 'classifyname',
          prop: 'classifyName',
          search: true,
          sortable:true
          sortable:true,
        },
        {
          label: '业务类型oid',
          prop: 'btmoid',
          prop: 'btmOid',
          sortable:true,
          width: 150
          hide:true,
          // width: 250
        },
        {
          label: '业务类型id',
          prop: 'btmid',
          prop: 'btmId',
          sortable:true,
          width: 150
          // width: 150
        },
        {
          label: '推送类型',
          prop: 'sendtype',
          prop: 'sendType',
          search: true,
          sortable:true,
          width: 150
          // width: 150,
          formatter: function (row, column) {
            if (row.sendType === 'Enabled') {
              return '发布';
            } else if (row.sendType === 'TakeBack') {
              return '回收';
            } else if (row.sendType === 'Disabled') {
              return '停用';
            }
          }
        },
        {
          label: '是否分解任务',
          prop: 'sendflag',
          prop: 'sendFlag',
          search: true,
          sortable:true,
          width: 130,
          // width: 130,
          html:true,
          align:'center',
          type:'select',
@@ -111,7 +170,7 @@
            value: "key"
          },
          formatter : function (row, column) {
            return row.sendflag == 'true' || row.sendflag == '1' ? '<i class="el-icon-check"></i>' : '<i class="el-icon-close"></i>'
            return row.sendFlag == 'true' || row.sendFlag == '1' ? '<i class="el-icon-check" style="color: limegreen;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: red;font-size: 20px;font-weight: 800" ></i>'
          }
        }
      ]
@@ -130,6 +189,25 @@
    }
  },
  methods: {
    dockingGetList(val){
      this.data=val.records;
      this.page.pageSize=val.size;
      this.page.currentPage=val.current;
      this.page.total=val.total;
    },
    async cellDbClick(row, column, cell, event) {
      for (const key in row) {
        if (key === column.property) {
          this.value = row[key];
        }
      }
      try {
        await this.$copyText(this.value);
        this.$message.success('复制成功');
      } catch (error) {
        this.$message.warning('复制失败');
      }
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
@@ -164,7 +242,7 @@
          query['conditionMap["' + key + '"]'] = this.query[key];
        }
      }
      getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => {
      getDataList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;