From 240c74ffb2b98faddf76648116ca9eeb61ee2cde Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 11 一月 2024 09:34:49 +0800
Subject: [PATCH] 问题项修改

---
 src/views/eam/ABC/StreamList.vue |  579 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 322 insertions(+), 257 deletions(-)

diff --git a/src/views/eam/ABC/StreamList.vue b/src/views/eam/ABC/StreamList.vue
index 8c396d9..cbe2fbf 100644
--- a/src/views/eam/ABC/StreamList.vue
+++ b/src/views/eam/ABC/StreamList.vue
@@ -1,16 +1,20 @@
 <template>
-  <a-card :bordered="false">
+  <a-card
+    title='ABC璇勫垎'
+    :bordered="false"
+  >
     <!-- 鏌ヨ鍖哄煙 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
+      <a-form
+        layout="inline"
+        @keyup.enter.native="searchQuery"
+      >
         <a-row :gutter="24">
-          <a-col
-          :span="6"
-          >
-            <a-form-item 
-            :labelCol="labelCol"
-            :wrapperCol="wrapperCol"
-            label="鍗曟嵁鍙�"
+          <a-col :span="6">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="鍗曟嵁鍙�"
             >
               <a-input
                 placeholder="璇疯緭鍏ュ崟鎹彿鏌ヨ"
@@ -34,7 +38,12 @@
         @click="searchReset"
         icon="reload"
       >閲嶇疆</a-button>
-      <a-button @click="handleAdd" type="primary" icon="plus" v-if="nodeSort===1">鏂板</a-button>
+      <a-button
+        @click="handleAdd"
+        type="primary"
+        icon="plus"
+        v-if="nodeSort===1"
+      >鏂板</a-button>
       <!-- <a-button type="primary" icon="download" @click="handleExportXls('璁惧ABC璇勪环')">瀵煎嚭</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">瀵煎叆</a-button>
@@ -45,9 +54,15 @@
 
     <!-- table鍖哄煙-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <div
+        class="ant-alert ant-alert-info"
+        style="margin-bottom: 16px;"
+      >
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
-        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+        <a
+          style="margin-left: 24px"
+          @click="onClearSelected"
+        >娓呯┖</a>
       </div>
 
       <a-table
@@ -56,300 +71,350 @@
         bordered
         rowKey="id"
         class="j-table-force-nowrap"
-        :scroll="{x:true}"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
         :customRow="clickThenSelect"
-        @change="handleTableChange">
+        @change="handleTableChange"
+      >
+        <!-- :scroll="{x:true}" -->
 
-        <template slot="htmlSlot" slot-scope="text">
+        <template
+          slot="htmlSlot"
+          slot-scope="text"
+        >
           <div v-html="text"></div>
         </template>
-        <template slot="imgSlot" slot-scope="text,record">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
-          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        <template
+          slot="imgSlot"
+          slot-scope="text,record"
+        >
+          <span
+            v-if="!text"
+            style="font-size: 12px;font-style: italic;"
+          >鏃犲浘鐗�</span>
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width:80px;font-size: 12px;font-style: italic;"
+          />
         </template>
-        <template slot="fileSlot" slot-scope="text">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+        <template
+          slot="fileSlot"
+          slot-scope="text"
+        >
+          <span
+            v-if="!text"
+            style="font-size: 12px;font-style: italic;"
+          >鏃犳枃浠�</span>
           <a-button
             v-else
             :ghost="true"
             type="primary"
             icon="download"
             size="small"
-            @click="downloadFile(text)">
+            @click="downloadFile(text)"
+          >
             涓嬭浇
           </a-button>
         </template>
-        <span slot="action" slot-scope="text, record">
+        <span
+          slot="action"
+          slot-scope="text, record"
+        >
           <div v-if="nodeValue===record.status">
-            <a @click="handleStreamNext(record)" :disabled="nodeSort===1&&nodeValue!==record.status" v-if="button1!={}">{{button1.name}}</a>
-          <a-divider type="vertical" v-if="button2!={}"/>
-            <a @click="handleStreamLast(record)" :disabled="nodeSort===1" v-if="button2!={}" >{{button2.name}}</a>
-         </div>
-         <div v-if="nodeSort===1&&nodeValue===record.status">
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
-                  <a>鍒犻櫎</a>
-                </a-popconfirm>
-              </a-menu-item>
-              <a-menu-item>
-                <a @click="handleEdit(record)">缂栬緫</a>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-         </div>
+            <a
+              @click="handleStreamNext(record)"
+              :disabled="nodeSort===1&&nodeValue!==record.status"
+              v-if="button1!={}"
+            >{{button1.name}}</a>
+            <a-divider
+              type="vertical"
+              v-if="button2!={}"
+            />
+            <a
+              @click="handleStreamLast(record)"
+              :disabled="nodeSort===1"
+              v-if="button2!={}"
+            >{{button2.name}}</a>
+          </div>
+          <div v-if="nodeSort===1&&nodeValue===record.status">
+            <a-divider type="vertical" />
+            <a-dropdown>
+              <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+              <a-menu slot="overlay">
+                <a-menu-item>
+                  <a-popconfirm
+                    title="纭畾鍒犻櫎鍚�?"
+                    @confirm="() => handleDelete(record.id)"
+                  >
+                    <a>鍒犻櫎</a>
+                  </a-popconfirm>
+                </a-menu-item>
+                <a-menu-item>
+                  <a @click="handleEdit(record)">缂栬緫</a>
+                </a-menu-item>
+              </a-menu>
+            </a-dropdown>
+          </div>
         </span>
 
       </a-table>
     </div>
 
     <a-tabs defaultActiveKey="1">
-      <a-tab-pane tab="鎿嶄綔璁板綍" key="1" >
+      <a-tab-pane
+        tab="鎿嶄綔璁板綍"
+        key="1"
+      >
         <StreamOperationList :mainId="streamOperationMainId" />
       </a-tab-pane>
-      <a-tab-pane tab="ABC璇勫垎" key="2" forceRender>
+      <a-tab-pane
+        tab="ABC璇勫垎"
+        key="2"
+        forceRender
+      >
         <ABCAssessmentList :mainId="aBCAssessmentMainId" />
       </a-tab-pane>
     </a-tabs>
 
-    <stream-modal ref="modalForm" @ok="modalFormOk"></stream-modal>
-    <node-model ref="nodeModel" @ok="modalFormOk"></node-model>
+    <stream-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></stream-modal>
+    <node-model
+      ref="nodeModel"
+      @ok="modalFormOk"
+    ></node-model>
   </a-card>
 </template>
 
 <script>
 
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import StreamModal from './modules/StreamModal'
-  import { getAction } from '@/api/manage'
-  import StreamOperationList from './StreamOperationList'
-  import ABCAssessmentList from './ABCAssessmentList'
-  import '@/assets/less/TableExpand.less'
-  import NodeModel from './modules/NodeModel.vue'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import StreamModal from './modules/StreamModal'
+import { getAction } from '@/api/manage'
+import StreamOperationList from './StreamOperationList'
+import ABCAssessmentList from './ABCAssessmentList'
+import '@/assets/less/TableExpand.less'
+import NodeModel from './modules/NodeModel.vue'
 
 
-  export default {
-    name: "StreamList",
-    mixins:[JeecgListMixin],
-    components: {
-      StreamOperationList,
-      ABCAssessmentList,
-      StreamModal,
-        NodeModel
+export default {
+  name: "StreamList",
+  mixins: [JeecgListMixin],
+  components: {
+    StreamOperationList,
+    ABCAssessmentList,
+    StreamModal,
+    NodeModel
+  },
+  data() {
+    return {
+      description: '璁惧ABC璇勪环绠$悊椤甸潰',
+      // 琛ㄥご
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: "center",
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1;
+          }
+        },
+        {
+          title: '鍗曟嵁鍙�',
+          align: "center",
+          dataIndex: 'num',
+        },
+        {
+          title: '褰撳墠鑺傜偣',
+          align: "center",
+          dataIndex: 'status_dictText',
+        },
+        {
+          title: '鍗曟嵁绫诲瀷',
+          align: "center",
+          dataIndex: 'type_dictText',
+        },
+        {
+          title: '鍙戣捣鏃堕棿',
+          align: "center",
+          dataIndex: 'createTime',
+        },
+        // width: 300
+        {
+          title: '鍙戣捣浜�',
+          align: "center",
+          dataIndex: 'createBy_dictText'
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: "center",
+          scopedSlots: { customRender: 'action' },
+        }
+        // fixed: "right",
+      ],
+      url: {
+        list: "/eam/stream/list",
+        delete: "/eam/stream/delete",
+        deleteBatch: "/eam/stream/deleteBatch",
+        exportXlsUrl: "/eam/stream/exportXls",
+        importExcelUrl: "eam/stream/importExcel",
+        getPreInfo: "eam/stream/getPreInfo"
+      },
+      dictOptions: {
+      },
+      /* 鍒嗛〉鍙傛暟 */
+      ipagination: {
+        current: 1,
+        pageSize: 20,
+        pageSizeOptions: ['5', '10', '20', '50'],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      selectedMainId: '',
+      superFieldList: [],
+      streamOperationMainId: '',
+      aBCAssessmentMainId: '',
+      button1: {},
+      button2: {},
+      nodeSort: 0,
+      nodeValue: ''
+    }
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  mounted() {
+    this.getPreInfo();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+  methods: {
+    initDictConfig() {
     },
-    data () {
+    clickThenSelect(record) {
       return {
-        description: '璁惧ABC璇勪环绠$悊椤甸潰',
-        // 琛ㄥご
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-          wrapperCol: {
-            xs: { span: 24 },
-            sm: { span: 16 },
-        },
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },
-          {
-            title:'鍗曟嵁鍙�',
-            align:"center",
-            dataIndex: 'num',
-            width:400
-          },
-          {
-            title:'褰撳墠鑺傜偣',
-            align:"center",
-            dataIndex: 'status_dictText',
-            width:300
-          },
-          {
-            title:'鍗曟嵁绫诲瀷',
-            align:"center",
-            dataIndex: 'type_dictText',
-            width:300
-          },
-          {
-            title:'鍙戣捣鏃堕棿',
-            align:"center",
-            dataIndex: 'createTime',
-            width:300
-          },
-          {
-            title:'鍙戣捣浜�',
-            align:"center",
-            dataIndex: 'createBy_dictText'
-          },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align:"center",
-            fixed:"right",
-            width:200,
-            scopedSlots: { customRender: 'action' },
+        on: {
+          click: () => {
+            this.onSelectChange(record.id.split(","), [record]);
           }
-        ],
-        url: {
-          list: "/eam/stream/list",
-          delete: "/eam/stream/delete",
-          deleteBatch: "/eam/stream/deleteBatch",
-          exportXlsUrl: "/eam/stream/exportXls",
-          importExcelUrl: "eam/stream/importExcel",
-          getPreInfo:"eam/stream/getPreInfo"
-        },
-        dictOptions:{
-        },
-        /* 鍒嗛〉鍙傛暟 */
-        ipagination:{
-          current: 1,
-          pageSize: 5,
-          pageSizeOptions: ['5', '10', '50'],
-          showTotal: (total, range) => {
-            return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
-          },
-          showQuickJumper: true,
-          showSizeChanger: true,
-          total: 0
-        },
-        selectedMainId:'',
-        superFieldList:[],
-        streamOperationMainId: '',
-        aBCAssessmentMainId: '',
-        button1:{},
-        button2:{},
-        nodeSort:0,
-        nodeValue:''
+        }
       }
     },
-    created() {
-      this.getSuperFieldList();
-    },
-    mounted(){
-      this.getPreInfo();
-    },
-    computed: {
-      importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    handleStreamNext(record) {
+      var step = {
+        name: this.button1.name,
+        value: this.button1.value,
+        opType: 'next',
+        nodeSort: this.nodeSort,
+        node: this.nodeValue,
+        streamId: record.id
       }
+      this.$refs.nodeModel.title = this.button1.name + "鎿嶄綔";
+      this.$refs.nodeModel.edit(step);
     },
-    methods: {
-      initDictConfig(){
-      },
-      clickThenSelect(record) {
-        return {
-          on: {
-            click: () => {
-              this.onSelectChange(record.id.split(","), [record]);
-            }
-          }
-        }
-      },
-      handleStreamNext(record){
-        var step = {
-          name:this.button1.name,
-          value:this.button1.value,
-          opType:'next',
-          nodeSort:this.nodeSort,
-          node:this.nodeValue,
-          streamId:record.id
-        }
-        this.$refs.nodeModel.title = this.button1.name+"鎿嶄綔";
-        this.$refs.nodeModel.edit(step);
-      },
-      handleStreamLast(record){
-        var step = {
-          name:this.button2.name,
-          value:this.button2.value,
-          opType:'last',
-          nodeSort:this.nodeSort,
-          node:this.nodeValue,
-          streamId:record.id
-        }
-        this.$refs.nodeModel.title = this.button2.name+"鎿嶄綔";
-        this.$refs.nodeModel.edit(step);
-      },
-      onClearSelected() {
-        this.selectedRowKeys = [];
-        this.selectionRows = [];
-        this.selectedMainId=''
-      },
-      onSelectChange(selectedRowKeys, selectionRows) {
-        if(selectedRowKeys.length===1){
-          this.selectedMainId=selectedRowKeys[0]
-          this.streamOperationMainId = selectionRows[0]['id']
-          this.aBCAssessmentMainId = selectionRows[0]['id']
-        }else{
-          this.selectedMainId=''
-          this.streamOperationMainId = ''
-          this.aBCAssessmentMainId = ''
-        }
-      
-        this.selectedRowKeys = selectedRowKeys;
-        this.selectionRows = selectionRows;
-       
-      },
-      loadData(arg) {
-        if(!this.url.list){
-          this.$message.error("璇疯缃畊rl.list灞炴��!")
-          return
-        }
-        //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
-        if (arg === 1) {
-          this.ipagination.current = 1;
-        }
-        this.onClearSelected()
-        var params = this.getQueryParams();//鏌ヨ鏉′欢
-        this.loading = true;
-        getAction(this.url.list, params).then((res) => {
-          if (res.success) {
-            this.dataSource = res.result.records;
-            this.ipagination.total = res.result.total;
-          }
-          if(res.code===510){
-            this.$message.warning(res.message)
-          }
-          this.loading = false;
-        })
-      },
-      getSuperFieldList(){
-        let fieldList=[];
-        fieldList.push({type:'string',value:'num',text:'num',dictCode:''})
-        fieldList.push({type:'string',value:'status',text:'status',dictCode:''})
-        fieldList.push({type:'string',value:'type',text:'鍗曟嵁绫诲瀷',dictCode:''})
-        this.superFieldList = fieldList
-      },
-      getPreInfo(){
-        getAction(this.url.getPreInfo).then(res=>{
-            if(res.result.msg==='ok'){
-              this.button1 = res.result.buttons[0];
-              if(res.result.buttons.length===2){
-                this.button2 = res.result.buttons[1];
-              }
-              this.nodeSort = res.result.nodeSort;
-              this.nodeValue = res.result.nodeValue;
-            }
-        })
+    handleStreamLast(record) {
+      var step = {
+        name: this.button2.name,
+        value: this.button2.value,
+        opType: 'last',
+        nodeSort: this.nodeSort,
+        node: this.nodeValue,
+        streamId: record.id
       }
+      this.$refs.nodeModel.title = this.button2.name + "鎿嶄綔";
+      this.$refs.nodeModel.edit(step);
+    },
+    onClearSelected() {
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+      this.selectedMainId = ''
+    },
+    onSelectChange(selectedRowKeys, selectionRows) {
+      if (selectedRowKeys.length === 1) {
+        this.selectedMainId = selectedRowKeys[0]
+        this.streamOperationMainId = selectionRows[0]['id']
+        this.aBCAssessmentMainId = selectionRows[0]['id']
+      } else {
+        this.selectedMainId = ''
+        this.streamOperationMainId = ''
+        this.aBCAssessmentMainId = ''
+      }
+
+      this.selectedRowKeys = selectedRowKeys;
+      this.selectionRows = selectionRows;
+
+    },
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error("璇疯缃畊rl.list灞炴��!")
+        return
+      }
+      //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+      if (arg === 1) {
+        this.ipagination.current = 1;
+      }
+      this.onClearSelected()
+      var params = this.getQueryParams();//鏌ヨ鏉′欢
+      this.loading = true;
+      getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records;
+          this.ipagination.total = res.result.total;
+        }
+        if (res.code === 510) {
+          this.$message.warning(res.message)
+        }
+        this.loading = false;
+      })
+    },
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: 'string', value: 'num', text: 'num', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'status', text: 'status', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'type', text: '鍗曟嵁绫诲瀷', dictCode: '' })
+      this.superFieldList = fieldList
+    },
+    getPreInfo() {
+      getAction(this.url.getPreInfo).then(res => {
+        if (res.result.msg === 'ok') {
+          this.button1 = res.result.buttons[0];
+          if (res.result.buttons.length === 2) {
+            this.button2 = res.result.buttons[1];
+          }
+          this.nodeSort = res.result.nodeSort;
+          this.nodeValue = res.result.nodeValue;
+        }
+      })
     }
   }
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less'
+@import '~@assets/less/common.less';
 </style>
\ No newline at end of file

--
Gitblit v1.9.3