From 461e375dad5b7150f731367c4b6f9c36cf9d6469 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 15 二月 2025 16:22:32 +0800
Subject: [PATCH] 客户管理联调
---
src/components/Table/lims-table.vue | 21 +++++++++++++++------
src/views/system/customer/index.vue | 13 ++++++++++---
src/views/structural/capabilityAndLaboratory/capability/index.vue | 4 ----
3 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 4f4d89e..513b568 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -71,7 +71,7 @@
size="mini"
v-show="o.showHide ? o.showHide(scope.row) : true"
:disabled="o.disabled ? o.disabled(scope.row) : false"
- :icon="o.icon | iconFn(scope.row, o)"
+ :icon="iconFn(o)"
:plain="o.plain"
:style="{ 'color': o.name === '鍒犻櫎' ? '#f56c6c' : o.color }"
:type="o.type | typeFn(scope.row)"
@@ -167,11 +167,6 @@
export default {
name: 'ZTTable',
filters: {
- iconFn(val, row) {
- if (typeof (val) === 'function') {
- return val(row);
- } else return val;
- },
typeFn(val, row) {
// console.log(val, row, '11111111');
if (typeof (val) === 'function') {
@@ -277,6 +272,20 @@
},
methods: {
+ iconFn(row) {
+ if (row.name === '缂栬緫') {
+ return 'el-icon-edit'
+ } else if (row.name === '鍒犻櫎') {
+ return 'el-icon-delete'
+ } else if (row.name === '鏌ョ湅') {
+ return 'el-icon-view'
+ } else {
+ return row.icon
+ }
+ // if (typeof (val) === 'function') {
+ // return val(row);
+ // } else return val;
+ },
formatType(val, format) {
if (typeof (format) === 'function') {
return format(val);
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index d026e38..61b29a9 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -159,7 +159,6 @@
{
name: '缂栬緫',
type: 'text',
- icon: 'el-icon-edit',
clickFun: (row) => {
this.editForm(row);
},
@@ -167,7 +166,6 @@
{
name: '鍒犻櫎',
type: 'text',
- icon: 'el-icon-delete',
clickFun: (row) => {
this.delete(row);
},
@@ -251,7 +249,6 @@
{
name: '缂栬緫',
type: 'text',
- icon: 'el-icon-edit',
clickFun: (row) => {
this.editTestObjectForm(row);
},
@@ -259,7 +256,6 @@
{
name: '鍒犻櫎',
type: 'text',
- icon: 'el-icon-delete',
clickFun: (row) => {
this.deleteTest(row);
},
diff --git a/src/views/system/customer/index.vue b/src/views/system/customer/index.vue
index b6d0e30..6e24596 100644
--- a/src/views/system/customer/index.vue
+++ b/src/views/system/customer/index.vue
@@ -18,7 +18,7 @@
</div>
</div>
<div>
- <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"></lims-table>
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="formTitle" :visible.sync="addDia" width="450px">
<el-form ref="userForm" :model="user" :rules="userRules" label-position="right" label-width="100px">
@@ -111,7 +111,9 @@
formTitle: '',
addDia: false,
addPower: true,
- user: {},
+ user: {
+ company: ''
+ },
userRules: {
company: [{ required: true, message: '璇疯緭鍏ュ鎴峰悕绉�', trigger: 'blur' }],
companyEn: [{ required: true, message: '璇疯緭鍏ュ鎴峰悕绉癊N', trigger: 'blur' }],
@@ -146,12 +148,16 @@
this.queryParams.company = ''
this.getList()
},
+ pagination () {
+
+ },
openFormDia (type, row) {
this.addDia = true
+ this.user = {}
this.formTitle = type === 'add' ? '鏂板瀹㈡埛' : '缂栬緫瀹㈡埛'
this.operationType = type
if (type === 'edit') {
- this.user = row
+ this.user = this.HaveJson(row)
}
},
customAdd() {
@@ -183,6 +189,7 @@
})
},
reset () {
+ this.user = {}
this.addDia = false
this.resetForm("userForm");
},
--
Gitblit v1.9.3