浏览代码

修改bug

695593266@qq.com 11 月之前
父节点
当前提交
b707c2fbb1

+ 1 - 1
src/views/inspectionPlan/index.vue

@@ -291,7 +291,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 160,
+            width: 200,
             align: 'center',
             resizable: false,
             slot: 'action',

+ 152 - 133
src/views/inspectionStandard/index.vue

@@ -1,149 +1,168 @@
 <template>
-    <div class="ele-body">
-        <el-card shadow="never">
-            <search ref="search" @search="search"></search>
-            <ele-pro-table ref="table" :columns="columns" :datasource="datasource" cache-key="systemRoleTable1">
-                <!-- 表头工具栏 -->
-                <template v-slot:toolbar>
-                    <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon"
-                        @click="openEdit('add')">
-                        添加
-                    </el-button>
-                </template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <search ref="search" @search="search"></search>
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable1"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="openEdit('add')"
+          >
+            添加
+          </el-button>
+        </template>
 
-                <template v-slot:status="{ row }">
-                    {{ row.status ? '启用' : "停用" }}
-                </template>
+        <template v-slot:status="{ row }">
+          {{ row.status ? '启用' : '停用' }}
+        </template>
 
-                <template v-slot:type="{ row }">
-                    {{ getDictValue('质检标准类型', row.type) }}
-                </template>
-                <template v-slot:code="{ row }">
-                    <el-link type="primary" :underline="false" @click="openEdit('detail', row)">
-                        {{ row.code }}
-                    </el-link>
-                </template>
+        <template v-slot:type="{ row }">
+          {{ getDictValue('质检标准类型', row.type) }}
+        </template>
+        <template v-slot:code="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="openEdit('detail', row)"
+          >
+            {{ row.code }}
+          </el-link>
+        </template>
 
-
-                <!-- 操作列 -->
-                <template v-slot:action="{ row }">
-                    <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit('edit', row)">
-                        修改
-                    </el-link>
-                    <el-popconfirm class="ele-action" title="确定要删除此角色吗?" @confirm="remove(row)">
-                        <template v-slot:reference>
-                            <el-link type="danger" :underline="false" icon="el-icon-delete">
-                                删除
-                            </el-link>
-                        </template>
-                    </el-popconfirm>
-                </template>
-            </ele-pro-table>
-        </el-card>
-        <edit ref="edit" @done="done"></edit>
-    </div>
+        <!-- 操作列 -->
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="openEdit('edit', row)"
+          >
+            修改
+          </el-link>
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除此质检标准吗?"
+            @confirm="remove(row)"
+          >
+            <template v-slot:reference>
+              <el-link type="danger" :underline="false" icon="el-icon-delete">
+                删除
+              </el-link>
+            </template>
+          </el-popconfirm>
+        </template>
+      </ele-pro-table>
+    </el-card>
+    <edit ref="edit" @done="done"></edit>
+  </div>
 </template>
 <script>
-import search from './components/search.vue';
-import edit from './components/edit.vue';
-import { getList, removeItem } from '@/api/inspectionStandard';
-import dictMixins from '@/mixins/dictMixins';
-export default {
+  import search from './components/search.vue';
+  import edit from './components/edit.vue';
+  import { getList, removeItem } from '@/api/inspectionStandard';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
     mixins: [dictMixins],
     components: {
-        search,
-        edit
+      search,
+      edit
     },
     data() {
-        return {
-            columns: [
-                {
-                    width: 55,
-                    type: 'index',
-                    label: '序号',
-                    columnKey: 'index',
-                    align: 'center'
-                },
-                {
-                    prop: 'code',
-                    label: '标准编码',
-                    slot: 'code',
-                    align: 'center'
-                },
-                {
-                    label: '标准名称',
-                    prop: 'name',
-                    align: 'center'
-                },
-                {
-                    label: '标准类型',
-                    prop: 'type',
-                    slot: 'type',
-                    align: 'center'
-                },
-                {
-                    label: '标准代码',
-                    prop: 'standardCode',
-                    align: 'center'
-
-                },
-                {
-                    label: '状态',
-                    prop: 'status',
-                    slot: 'status',
-                    align: 'center'
-                },
-                {
-                    label: '版本号',
-                    prop: 'version',
-                    align: 'center'
-                },
-                {
-                    columnKey: 'action',
-                    label: '操作',
-                    width: 220,
-                    align: 'center',
-                    resizable: false,
-                    slot: 'action',
-                    showOverflowTooltip: true
-                }
-            ],
-        };
+      return {
+        columns: [
+          {
+            width: 55,
+            type: 'index',
+            label: '序号',
+            columnKey: 'index',
+            align: 'center'
+          },
+          {
+            prop: 'code',
+            label: '标准编码',
+            slot: 'code',
+            align: 'center'
+          },
+          {
+            label: '标准名称',
+            prop: 'name',
+            align: 'center'
+          },
+          {
+            label: '标准类型',
+            prop: 'type',
+            slot: 'type',
+            align: 'center'
+          },
+          {
+            label: '标准代码',
+            prop: 'standardCode',
+            align: 'center'
+          },
+          {
+            label: '状态',
+            prop: 'status',
+            slot: 'status',
+            align: 'center'
+          },
+          {
+            label: '版本号',
+            prop: 'version',
+            align: 'center'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 220,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ]
+      };
     },
     created() {
-        this.requestDict('质检标准类型')
+      this.requestDict('质检标准类型');
     },
     methods: {
-        datasource({ page, where, limit }) {
-            return getList({
-                ...where,
-                pageNum: page,
-                size: limit,
-
-            });
-        },
-        search(where) {
-            this.$refs.table.reload({
-                where: where,
-                page: 1
-            });
-        },
-        openEdit(type, row) {
-            this.$refs.edit.open(type, row);
-        },
+      datasource({ page, where, limit }) {
+        return getList({
+          ...where,
+          pageNum: page,
+          size: limit
+        });
+      },
+      search(where) {
+        this.$refs.table.reload({
+          where: where,
+          page: 1
+        });
+      },
+      openEdit(type, row) {
+        this.$refs.edit.open(type, row);
+      },
 
-        remove(row) {
-            removeItem([row.id])
-                .then((message) => {
-                    this.$message.success(message);
-                    this.done();
-                })
-                .catch((e) => {
-                });
-        },
-        done() {
-            this.$refs.search.search();
-        }
+      remove(row) {
+        removeItem([row.id])
+          .then((message) => {
+            this.$message.success(message);
+            this.done();
+          })
+          .catch((e) => {});
+      },
+      done() {
+        this.$refs.search.search();
+      }
     }
-};
-</script>
+  };
+</script>

+ 2 - 2
src/views/inspectionWork/components/Certificate.vue

@@ -212,5 +212,5 @@
     :deep(.el-form-item) {
       margin: 16px 0;
     }
-  }</style
->>
+  }
+</style>

+ 2 - 2
src/views/inspectionWork/components/search.vue

@@ -1,5 +1,5 @@
 <!-- 搜索表单 -->
-6
+
 <template>
   <el-form
     label-width="77px"
@@ -23,7 +23,7 @@
           />
         </el-form-item>
       </el-col>
-      <!-- 
+      <!--
       <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6}">
         <el-form-item label="状态:" >
           <el-select v-model="where.status" class="m-2" placeholder="请选择" size="large" style="width: 100%">