From 92ff846fb659c62037a32b1d8c15eae9df9d9b54 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期一, 18 九月 2023 13:24:30 +0800
Subject: [PATCH] Merge branch 'develop' of http://117.34.109.166:18448/r/vue_mdc_430

---
 src/views/eam/modules/precisionParameter/PrecisionParametersRight.vue |  393 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 393 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/modules/precisionParameter/PrecisionParametersRight.vue b/src/views/eam/modules/precisionParameter/PrecisionParametersRight.vue
new file mode 100644
index 0000000..c5a31b5
--- /dev/null
+++ b/src/views/eam/modules/precisionParameter/PrecisionParametersRight.vue
@@ -0,0 +1,393 @@
+<template>
+  <a-card
+    :bordered="false"
+    title="绮惧害鍙傛暟"
+  >
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form
+        layout="inline"
+        @keyup.enter.native="searchQuery"
+      >
+        <a-row :gutter="24">
+          <a-col
+            :md="8"
+            :sm="8"
+          >
+            <a-form-item label="绮惧害鍙傛暟缂栫爜">
+              <j-input
+                placeholder="璇疯緭鍏ョ簿搴﹀弬鏁扮紪鐮�"
+                v-model="queryParam.num"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col
+            :md="8"
+            :sm="8"
+          >
+            <a-form-item label="绮惧害鍙傛暟鍚嶇О">
+              <j-input
+                placeholder="璇疯緭鍏ョ簿搴﹀弬鏁板悕绉�"
+                v-model="queryParam.name"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div
+      class="table-operator"
+      style="margin-top: 5px"
+    >
+      <a-button
+        type="primary"
+        @click="searchQuery"
+        icon="search"
+      >鏌ヨ</a-button>
+      <a-button
+        @click="searchReset"
+        icon="reload"
+      >閲嶇疆</a-button>
+      <a-button
+        @click="handleAdd"
+        type="primary"
+        icon="plus"
+        :hidden="disabled"
+      >鏂板</a-button>
+      <a-button
+        type="primary"
+        icon="download"
+        @click="handleExportXls('鍘熷洜')"
+      >瀵煎嚭</a-button>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-button style="margin-left: 8px">
+          鎵归噺鎿嶄綔
+          <a-icon type="down" />
+        </a-button>
+        <a-menu slot="overlay">
+          <a-menu-item @click="batchDel">
+            <a-icon type="delete" />鍒犻櫎
+          </a-menu-item>
+        </a-menu>
+      </a-dropdown>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+      <a-table
+        ref="table"
+        bordered
+        size="middle"
+        rowKey="id"
+        :columns="columns"
+        :rowClassName="tableRowClass"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange"
+        :scroll="{ x: true}"
+      >
+        <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
+        <span
+          slot="num"
+          slot-scope="text"
+          style="font-weight: bold"
+        >
+          <j-ellipsis
+            :value="text"
+            :length="15"
+          />
+        </span>
+        <span
+          slot="name"
+          slot-scope="text"
+          style="font-weight: bold"
+        >
+          <j-ellipsis
+            :value="text"
+            :length="15"
+          />
+        </span>
+        <span
+          slot="model"
+          slot-scope="text"
+        >
+          <j-ellipsis
+            :value="text"
+            :length="15"
+          />
+        </span>
+        <!-- <span
+          slot="status"
+          slot-scope="text,record"
+        >
+          <a-badge
+            v-if="record.status==1"
+            status="success"
+          />
+          <span
+            v-if="record.status==1"
+            class="success"
+          >鍚敤</span>
+          <a-badge
+            v-if="record.status==0"
+            status="error"
+          />
+          <span
+            v-if="record.status==0"
+            class="error"
+          >绂佺敤</span>
+        </span> -->
+
+        <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
+                  href="javascript:;"
+                  @click="handleDetail(record)"
+                >璇︽儏</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm
+                  title="纭畾鍒犻櫎鍚�?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+              <!-- <a-menu-item v-else>
+              <a-popconfirm title="褰撳墠淇℃伅宸茶寮曠敤锛岃鍏堝垹闄ゅ叧鑱斾俊鎭悗鍐嶆墽琛屽垹闄ゆ搷浣�">
+                <a class="frozenRowClass">鍒犻櫎</a>
+              </a-popconfirm>
+            </a-menu-item> -->
+
+              <!-- <a-menu-item v-if="record.status==1">
+              <a-popconfirm
+                title="纭畾绂佺敤鍚�?"
+                @confirm="() => handleActive(record.id)"
+              >
+                <a>绂佺敤</a>
+              </a-popconfirm>
+            </a-menu-item> -->
+              <!-- <a-menu-item v-if="record.status==0">
+              <a-popconfirm
+                title="纭畾鍚敤鍚�?"
+                @confirm="() => handleActive(record.id)"
+              >
+                <a>鍚敤</a>
+              </a-popconfirm>
+            </a-menu-item> -->
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table鍖哄煙-end -->
+
+    <precision-parameters-model
+      ref="modalForm"
+      @ok="modalFormOk"
+      :nodeSelected="nodeSelected"
+    ></precision-parameters-model>
+  </a-card>
+</template>
+
+<script>
+
+import JDictSelectTag from '@/components/dict/JDictSelectTag'
+import { requestPut } from '@/api/manage'
+import PrecisionParametersModel from './PrecisionParametersModel'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JInput from '@/components/jeecg/JInput'
+import JEllipsis from "@/components/jeecg/JEllipsis";
+import Tooltip from 'ant-design-vue/es/tooltip'
+export default {
+  name: 'PrecisionParametersRight',
+  mixins: [JeecgListMixin],
+  components: {
+    Tooltip,
+    PrecisionParametersModel,
+    JDictSelectTag,
+    JInput,
+    JEllipsis,
+  },
+  props: {
+    recordSelect: {},
+  },
+  data() {
+    return {
+      disabled: true,
+      nodeSelected: {},
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          align: 'center',
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1
+          },
+          width: 50,
+        },
+        {
+          title: '绮惧害鍙傛暟缂栫爜',
+          align: 'center',
+          dataIndex: 'num',
+          scopedSlots: {
+            customRender: 'num'
+          },
+          // sorter: true,
+        },
+        {
+          title: '绮惧害鍙傛暟鍚嶇О',
+          align: 'center',
+          dataIndex: 'name',
+          scopedSlots: {
+            customRender: 'name'
+          },
+          // sorter: true,
+        },
+       /*  {
+          title: '绮惧害鍙傛暟鍒嗙被',
+          align: 'center',
+          dataIndex: 'precisionParametersCategoryNumName',
+          scopedSlots: {
+            customRender: 'precisionParametersCategoryNumName'
+          },
+          // sorter: true,
+        }, */
+        {
+          title: '璁¢噺鍗曚綅',
+          align: 'center',
+          dataIndex: 'unitId_dictText',
+          scopedSlots: {
+            customRender: 'unitId_dictText'
+          },
+          // sorter: true,
+        },
+        {
+          title: '鍒涘缓浜�',
+          align: "center",
+          dataIndex: 'createBy',
+        },
+        {
+          title: '鍒涘缓鏃堕棿',
+          align: "center",
+          dataIndex: 'createTime',
+        },
+        {
+          title: '淇敼浜�',
+          align: "center",
+          dataIndex: 'updateBy',
+        },
+        {
+          title: '淇敼鏃堕棿',
+          align: "center",
+          dataIndex: 'updateTime',
+        },
+        {
+          title: '澶囨敞',
+          align: "center",
+          dataIndex: 'remark',
+        },
+        {
+
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action'
+          },
+          width: 150,
+          fixed: 'right',
+        },
+      ],
+      url: {
+        list: '/eam/precisionParameters/list',
+        delete: "/eam/precisionParameters/delete",
+        deleteBatch: "/eam/precisionParameters/deleteBatch",
+        exportXlsUrl: "/eam/precisionParameters/exportXls",
+        importExcelUrl: "eam/precisionParameters/importExcel",
+      },
+    }
+  },
+
+
+  methods: {
+    handleAdd: function () {
+      this.$refs.modalForm.add({ precisionParametersCategoryNumName: this.precisionParametersCategoryNumName });
+      this.$refs.modalForm.title = "鏂板";
+      this.$refs.modalForm.disableSubmit = false;
+      this.$refs.modalForm.precisionParametersCategoryId = this.nodeSelected.key;
+    },
+    //绂佺敤鐘舵�佹牱寮�
+    tableRowClass(record, index) {
+      if (record.status != "1") {
+        return "frozenRowClass";
+      }
+      return "";
+    },
+    searchReset() {
+      if ('-1' != this.nodeSelected.key) {
+        this.disabled = false;
+        this.queryParam = [];
+        this.queryParam.precisionParametersCategoryId = this.nodeSelected.key;
+      } else {
+        this.disabled = true;
+        this.queryParam = [];
+      }
+      this.loadData(1);
+    },
+  },
+  watch: {
+    recordSelect(val) {
+      this.nodeSelected = val;
+      this.precisionParametersCategoryNumName = this.nodeSelected.rfield1 + "/" + this.nodeSelected.rfield2;
+      if ('-1' != this.nodeSelected.key) {
+        this.disabled = false;
+        this.queryParam = [];
+        this.queryParam.precisionParametersCategoryId = this.nodeSelected.key;
+      } else {
+        this.disabled = true;
+        this.queryParam = [];
+      }
+      this.loadData(1);
+    }
+  },
+
+}
+</script>
+
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+/deep/ .frozenRowClass {
+  color: #c9c9c9;
+}
+/deep/ .success {
+  color: green;
+}
+/deep/ .error {
+  color: red;
+}
+/deep/ .notShow {
+  display: none;
+}
+.fontweight {
+  font-weight: bold;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3