From eef11aea39d1a40eefdd4a782ed3212a3c4bbca2 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:04 +0800
Subject: [PATCH] 完成7.2方法t验证迁移

---
 src/components/view/a7-method-verification.vue       |  221 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/components/do/a7-method-verification/formDIa.vue |    2 
 2 files changed, 222 insertions(+), 1 deletions(-)

diff --git a/src/components/do/a7-method-verification/formDIa.vue b/src/components/do/a7-method-verification/formDIa.vue
index ced40e5..961d998 100644
--- a/src/components/do/a7-method-verification/formDIa.vue
+++ b/src/components/do/a7-method-verification/formDIa.vue
@@ -443,7 +443,7 @@
   margin-top: 2vh !important;
 }
 >>>.el-dialog__body {
-  max-height: 720px;
+  max-height: 75vh;
   overflow-y: auto;
 }
 .tables {
diff --git a/src/components/view/a7-method-verification.vue b/src/components/view/a7-method-verification.vue
new file mode 100644
index 0000000..a922044
--- /dev/null
+++ b/src/components/view/a7-method-verification.vue
@@ -0,0 +1,221 @@
+<template>
+  <div>
+    <div>
+      <div class="view-title">
+        <span>鏂规硶楠岃瘉</span>
+        <span>
+          <el-button size="medium" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
+        </span>
+      </div>
+      <div class="search-background">
+        <span class="search-group">
+          <span style="width: 120px">鏍囧噯鏂规硶锛�</span>
+          <el-input size="small" v-model="searchForm.methodName" clearable></el-input>
+        </span>
+        <span class="search-group">
+          <el-button size="medium"  @click="resetSearchForm">閲� 缃�</el-button>
+          <el-button size="medium" type="primary" @click="searchList">鏌� 璇�</el-button>
+        </span>
+      </div>
+      <div class="table">
+        <div>
+          <TableCard :showForm="false" :showTitle="false">
+            <template v-slot:table>
+              <ZTTable
+                :column="tableColumn"
+                :table-data="tableData"
+                :table-loading="tableLoading"
+                :height="'calc(100vh - 23em)'"
+                style="padding: 0 15px;margin-bottom: 16px">
+              </ZTTable>
+            </template>
+          </TableCard>
+          <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]"
+                         :total="total" layout="->,total, sizes, prev, pager, next, jumper"
+                         @size-change="handleSizeChange"
+                         @current-change="handleCurrentChange">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <formDIa ref="formDIa" v-if="formDIa" :operationType="operationType" @closeDia="closeDia"></formDIa>
+  </div>
+</template>
+
+<script>
+import ZTTable from '../caorui/ZTTable/index.vue';
+import TableCard from '../caorui/TableCard/index.vue';
+import formDIa from '../do/a7-method-verification/formDIa.vue';
+
+export default {
+  name: 'a7-method-verification',
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: { TableCard, ZTTable, formDIa },
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      searchForm: {
+        methodName: '',
+        operationType: 1,
+      },
+      options: [
+        { label: '涓婂崐骞�', value: '1' },
+        { label: '涓嬪崐骞�', value: '2' },
+      ],
+      tableColumn: [
+        {
+          label: '鏍囧噯鏂规硶',
+          prop: 'methodName',
+          minWidth: '100'
+        },
+        {
+          label: '楠岃瘉鍘熷洜',
+          prop: 'verifyReason',
+          minWidth: '100'
+        },
+        {
+          label: '涓昏鎶�鏈彉鍖�',
+          prop: 'technologyChange',
+          minWidth: '100'
+        },
+        {
+          dataType: 'action',
+          minWidth: '60',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '缂栬緫',
+              type: 'text',
+              clickFun: (row) => {
+                this.openFormDia('edit', row);
+              },
+            },
+            {
+              name: '鍒犻櫎',
+              type: 'text',
+              color: '#f56c6c',
+              clickFun: (row) => {
+                this.deleteRow(row);
+              },
+            }
+
+          ]
+        }
+      ],
+      tableData: [],
+      tableLoading: false,
+      page: {
+        size: 20,
+        current: 1,
+      },
+      total: 0,
+      formDIa: false,
+      operationType: '',
+    };
+  },
+  mounted() {
+    this.searchList()
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    // 鏌ヨ鍒楄〃
+    searchList() {
+      const entity = {
+        methodName: this.searchForm.methodName,
+        operationType: this.searchForm.operationType,
+      }
+      const page = this.page
+      this.tableLoading = true
+      this.$axios.post(this.$api.processMethodVerify.pagesMethodVerify, { entity, page }, {
+        headers: {
+          "Content-Type": "application/json"
+        },
+        noQs: true
+      }).then(res => {
+        this.tableLoading = false
+        if (res.code === 201) return
+        this.tableData = res.data.records
+        this.total = res.data.total
+      }).catch(err => {
+        console.log('err---', err);
+        this.tableLoading = false
+      })
+    },
+    // 鍒犻櫎
+    deleteRow (row) {
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        this.tableLoading = true
+        this.$axios.get(this.$api.processMethodVerify.delMethodVerify + '?methodVerifyId=' + row.methodVerifyId).then(res => {
+          this.tableLoading = false
+          if (res.code === 201) return
+          this.$message.success('鍒犻櫎鎴愬姛')
+          this.searchList()
+        }).catch(err => {
+          this.tableLoading = false
+          console.log('err---', err);
+        })
+      })
+    },
+    // 閲嶇疆鏌ヨ鏉′欢
+    resetSearchForm() {
+      this.searchForm.methodName = '';
+      this.searchList()
+    },
+    openFormDia (type, row) {
+      this.formDIa = true
+      this.operationType = type
+      this.$nextTick(() => {
+        this.$refs.formDIa.openDia(row)
+      })
+    },
+    // 鍏抽棴寮规
+    closeDia () {
+      this.formDIa = false
+      this.searchList()
+    },
+    // 鍒嗛〉
+    handleSizeChange(val) {
+      this.page.size = val;
+      this.searchList();
+    },
+    handleCurrentChange(val) {
+      this.page.current = val;
+      this.searchList();
+    },
+  }
+};
+</script>
+
+<style scoped>
+.view-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 60px;
+  padding-left: 20px;
+}
+
+.search-background {
+  width: 100%;
+  height: 80px;
+  line-height: 80px;
+  background-color: #ffffff;
+  display: flex;
+}
+
+.search-group {
+  display: flex;
+  align-items: center;
+  margin: 0 20px;
+}
+
+.table {
+  margin-top: 20px;
+  background-color: #ffffff;
+  padding-top: 20px;
+}
+</style>

--
Gitblit v1.9.3