From b50e7d0c574584b8ad02ad04715760c7c42a0b7d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 09 七月 2022 11:02:46 +0800
Subject: [PATCH] 1.生产开报工前端页面开发完成

---
 src/views/template.vue |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/views/template.vue b/src/views/template.vue
index eb5b393..a290ca2 100644
--- a/src/views/template.vue
+++ b/src/views/template.vue
@@ -20,9 +20,9 @@
               <el-select v-model="form.OrgType" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in OrgTypeArr"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.code"
                 />
               </el-select>
             </el-form-item>
@@ -47,6 +47,7 @@
           :data="tableData"
           :height="tableHeight"
           border
+          stripe
           :style="{width: 100+'%',height:tableHeight+'px',}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
@@ -105,8 +106,8 @@
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-button type="text" @click="edit('edit',row)">淇敼</el-button>
-                <el-button type="text" @click="del(row.id)">鍒犻櫎</el-button>
+                <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>
+                <el-button type="text" @click="del(row)">鍒犻櫎</el-button>
               </div>
             </template>
           </el-table-column>
@@ -126,9 +127,9 @@
     </div>
 
     <el-dialog
-      :title="operation==='add'?'鏂板':'淇敼'"
+      :title="operation==='add'?'鏂板':'缂栬緫'"
       :visible.sync="dialogVisible"
-      width="50%"
+      width="60%"
       top="15vh"
       @closed="handleClose"
       @close="handleClose"
@@ -136,22 +137,23 @@
       <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px">
         <el-form-item label="缁勭粐绫诲瀷" prop="OrgType" />
         <el-form-item label="缁勭粐缂栫爜" prop="OrgCode">
-          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 220px" />
+          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
         </el-form-item>
         <el-form-item label="缁勭粐鍚嶇О" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" style="width: 220px" />
+          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
         </el-form-item>
         <el-form-item prop="SupUnit" label="涓婄骇鍗曚綅">
           <el-select
             v-model="dialogForm.SupUnit"
-            style="width: 220px"
+            style="width: 200px"
             placeholder="璇烽�夋嫨"
             :popper-append-to-body="false"
           >
             <el-option
               v-for="item in SupUnitArr"
-              :label="item.org_name"
-              :value="item.id"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
             />
           </el-select>
         </el-form-item>
@@ -207,7 +209,7 @@
         prop: 'lm_date', // 鎺掑簭瀛楁
         order: 'desc', // 鎺掑簭瀛楁
         page: 1, // 绗嚑椤�
-        rows: 10 // 姣忛〉澶氬皯鏉�
+        rows: 20 // 姣忛〉澶氬皯鏉�
       },
       OrgTypeArr: [
         { label: '宸ュ巶', value: 'F' },
@@ -303,13 +305,13 @@
       })
     },
     // 鍒犻櫎鎸夐挳
-    async del(id) {
+    async del(row) {
       this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        DeleteOrganization({ orgid: id }).then(res => {
+        DeleteOrganization({ orgid: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
             this.getOrganizationSearch()
@@ -336,10 +338,8 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
-            OrganType: this.dialogFormOrgTypeSelected,
             OrganCode: this.dialogForm.OrgCode,
             OrganName: this.dialogForm.OrgName,
-            SupUnit: this.dialogFormOrgTypeSelected === 'F' ? '0' : this.dialogForm.SupUnit,
             OperType: this.operation === 'add' ? 'Add' : 'Update',
             Operator: getCookie('admin')
           }

--
Gitblit v1.9.3