From 0fe10b533514a73915abd534493bffb6c5df016a Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期四, 24 七月 2025 14:13:24 +0800
Subject: [PATCH] 安灯管理

---
 src/views/system/AndonOrderList.vue |  300 ++++++++++++++++++++++++++++++++---------------------------
 1 files changed, 164 insertions(+), 136 deletions(-)

diff --git a/src/views/system/AndonOrderList.vue b/src/views/system/AndonOrderList.vue
index f07309c..852facb 100644
--- a/src/views/system/AndonOrderList.vue
+++ b/src/views/system/AndonOrderList.vue
@@ -8,19 +8,19 @@
 
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="璁惧缂栧彿">
-              <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input>
+              <j-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></j-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="瀹夌伅绫诲瀷">
               <j-dict-select-tag placeholder="璇烽�夋嫨瀹夌伅绫诲瀷" dictCode="andon_type" v-model="queryParam.andonType"
-                                 allow-clear/>
+                                 allow-clear />
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="瀹夌伅鐘舵��">
               <j-dict-select-tag placeholder="璇烽�夋嫨瀹夌伅鐘舵��" dictCode="order_status" v-model="queryParam.orderStatus"
-                                 allow-clear/>
+                                 allow-clear />
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -33,43 +33,37 @@
         </a-row>
       </a-form>
     </div>
-
     <!-- table鍖哄煙-begin -->
     <div>
-<!--      <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>-->
-<!--      </div>-->
+      <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>
+      </div>
 
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
+    <a-table
+      ref="table"
+      size="middle"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      class="j-table-force-nowrap"
+      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+      @change="handleTableChange">
 
+      <template slot='imageFiles' slot-scope='text, record, index'>
+        <span v-if="!text" style="font-size: 12px;font-style: italic;"> </span>
+        <img v-else :src="getImgView(text)" :preview="record.imageFiles" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+      </template>
         <span slot="action" slot-scope="text, record">
-<!--          <a @click="handleEdit(record)">缂栬緫</a>-->
-
-<!--          <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>-->
-<!--          </a-dropdown>-->
+          <a-popconfirm title="纭畾鍝嶅簲鍚�?" @confirm="() =>responseData(record.id)">
+            <a v-if="record.orderStatus === '1'" >鍝嶅簲</a>
+          </a-popconfirm>
+          <a v-if="record.orderStatus === '2'" @click.stop="handleSolve(record)">澶勭悊</a>
         </span>
-
-      </a-table>
+    </a-table>
     </div>
     <!-- table鍖哄煙-end -->
 
@@ -79,117 +73,151 @@
 </template>
 
 <script>
-  import '@assets/less/TableExpand.less'
-  import AndonOrderModal from './modules/AndonOrderModal.vue'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import '@assets/less/TableExpand.less'
+import AndonOrderModal from './modules/AndonOrderModal.vue'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { deleteAction, getAction, postAction } from '@api/manage'
 
-  export default {
-    name: "AndonOrderList",
-    mixins:[JeecgListMixin],
-    components: {
-      AndonOrderModal
-    },
-    data () {
-      return {
-        description: '瀹夌伅绠$悊椤甸潰',
-        // 琛ㄥご
-        columns: [
-		   {
-            title: '璁惧缂栧彿',
-            align:"center",
-            dataIndex: 'equipmentId'
-           },
-		   {
-            title: '瀹夌伅绫诲瀷',
-            align:"center",
-            dataIndex: 'andonType_dictText'
-           },
-		   {
-            title: '瀹夌伅浜�',
-            align:"center",
-            dataIndex: 'operator_dictText'
-           },
-		   {
-            title: '瀹夌伅鏃堕棿',
-            align:"center",
-            dataIndex: 'operateTime'
-           },
-       {
-            title: '鍛煎彨鍘熷洜',
-            align:"center",
-            dataIndex: 'callReason'
-           },
-       {
-            title: '瀹夌伅鐘舵��',
-            align:"center",
-            dataIndex: 'orderStatus_dictText'
-           },
-		   {
-            title: '鍝嶅簲浜�',
-            align:"center",
-            dataIndex: 'responder_dictText'
-           },
-		   {
-            title: '鍝嶅簲鏃堕棿',
-            align:"center",
-            dataIndex: 'responseTime'
-           },
-		   {
-            title: '澶勭悊浜�',
-            align:"center",
-            dataIndex: 'processor'
-           },
-		   {
-            title: '澶勭悊瀹屾垚鏃堕棿',
-            align:"center",
-            dataIndex: 'processTime'
-           },
-		   {
-            title: '闂鎻忚堪',
-            align:"center",
-            dataIndex: 'problemDescreption'
-           },
-		   {
-            title: '澶勭悊缁撴灉鎻忚堪',
-            align:"center",
-            dataIndex: 'resolutionDescreption'
-           },
-		   {
-            title: '澶勭悊缁撴灉鍥剧墖',
-            align:"center",
-            dataIndex: 'imageFiles'
-           },
-		   // {
-       //      title: '鎵�灞炲巶鎴�',
-       //      align:"center",
-       //      dataIndex: 'plantName'
-       //     },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align:"center",
-            scopedSlots: { customRender: 'action' },
+export default {
+  name: 'AndonOrderList',
+  mixins: [JeecgListMixin],
+  components: {
+    AndonOrderModal
+  },
+  data() {
+    return {
+      description: '瀹夌伅绠$悊椤甸潰',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
           }
-        ],
-		url: {
-          list: "/mdc/andonOrder/list",
-          delete: "/mdc/andonOrder/delete",
-          deleteBatch: "/mdc/andonOrder/deleteBatch",
-          exportXlsUrl: "mdc/andonOrder/exportXls",
-          importExcelUrl: "mdc/andonOrder/importExcel",
-       },
+        },
+        {
+          title: '璁惧缂栧彿',
+          align: 'center',
+          dataIndex: 'equipmentId'
+        },
+        {
+          title: '瀹夌伅绫诲瀷',
+          align: 'center',
+          dataIndex: 'andonType_dictText'
+        },
+        {
+          title: '瀹夌伅浜�',
+          align: 'center',
+          dataIndex: 'operator_dictText'
+        },
+        {
+          title: '瀹夌伅鏃堕棿',
+          align: 'center',
+          dataIndex: 'operateTime'
+        },
+        {
+          title: '闂鎻忚堪',
+          align: 'center',
+          dataIndex: 'callReason'
+        },
+        {
+          title: '瀹夌伅鐘舵��',
+          align: 'center',
+          dataIndex: 'orderStatus_dictText'
+        },
+        {
+          title: '鍝嶅簲浜�',
+          align: 'center',
+          dataIndex: 'responder_dictText'
+        },
+        {
+          title: '鍝嶅簲鏃堕棿',
+          align: 'center',
+          dataIndex: 'responseTime'
+        },
+        {
+          title: '澶勭悊浜�',
+          align: 'center',
+          dataIndex: 'processor_dictText'
+        },
+        {
+          title: '澶勭悊瀹屾垚鏃堕棿',
+          align: 'center',
+          dataIndex: 'processTime'
+        },
+        {
+          title: '澶勭悊缁撴灉鎻忚堪',
+          align: 'center',
+          dataIndex: 'resolutionDescreption'
+        },
+        {
+          title: '澶勭悊缁撴灉鍥剧墖',
+          align: 'center',
+          dataIndex: 'imageFiles',
+          scopedSlots: { customRender: 'imageFiles' }
+        },
+        // {
+        //      title: '鎵�灞炲巶鎴�',
+        //      align:"center",
+        //      dataIndex: 'plantName'
+        //     },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          width: 150,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/mdc/andonOrder/list',
+        responseData: '/mdc/andonOrder/responseData',
+        delete: '/mdc/andonOrder/delete',
+        deleteBatch: '/mdc/andonOrder/deleteBatch',
+        exportXlsUrl: 'mdc/andonOrder/exportXls',
+        importExcelUrl: 'mdc/andonOrder/importExcel'
+      }
     }
   },
   computed: {
-    importExcelUrl: function(){
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     }
   },
-    methods: {
-
+  methods: {
+    responseData(id){
+      if(!this.url.responseData){
+        this.$message.error("璇疯缃畊rl.responseData灞炴��!")
+        return
+      }
+      var that = this;
+      getAction(that.url.responseData, {id: id}).then((res) => {
+        if (res.success) {
+          that.$notification.success({
+            message:'娑堟伅',
+            description:res.message
+          });
+          that.loadData();
+        } else {
+          that.$notification.warning({
+            message:'娑堟伅',
+            description:res.message
+          });
+        }
+      });
+    },
+    handleSolve(record) {
+      this.$refs.modalForm.dealWith(record);
+      this.$refs.modalForm.title = '澶勭悊'
+      this.$refs.modalForm.disabledEdit = true
     }
   }
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>
\ No newline at end of file

--
Gitblit v1.9.3