From 7697462af0a6f38c1e0d5446fa8db0800f8816c0 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期二, 10 六月 2025 16:38:43 +0800
Subject: [PATCH] 工艺参数/设备分类 导出功能屏蔽、精度参数-查询修改 导出屏蔽
---
src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue | 123 +++++++++++++++++++++++------------------
1 files changed, 69 insertions(+), 54 deletions(-)
diff --git a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
index 3f6b53b..f42b4d6 100644
--- a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
+++ b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
@@ -6,31 +6,34 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="璁惧缂栫爜">
- <a-input placeholder="璇疯緭鍏ヨ澶囩紪鐮佹绱�" v-model="queryParam.equipmentid"></a-input>
+ <a-col :md="7" :sm="7">
+ <a-form-item label="缁熶竴缂栫爜">
+ <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" v-model="queryParam.equipmentid"></a-input>
</a-form-item>
</a-col>
- <a-col :md="6" :sm="6">
+ <a-col :md="7" :sm="7">
<a-form-item label="璁惧鍚嶇О">
<a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" v-model="queryParam.equipmentname"></a-input>
</a-form-item>
</a-col>
+
+ <a-col :md="3" :sm="3">
+ <a-space>
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </a-space>
+ </a-col>
</a-row>
</a-form>
</div>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- </div>
+
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="equipmentid" :scroll="{聽 y: 300聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
- @change="handleTableChange">
+ @change="handleTableChange" :customRow="customRow">
</a-table>
</div>
<!-- table鍖哄煙-end -->
@@ -56,7 +59,7 @@
import Tooltip from 'ant-design-vue/es/tooltip'
import JDate from '@/components/jeecg/JDate'
import moment from 'moment'
- import { filterObj } from '@/utils/util';
+ import { filterObj } from '@/utils/util'
export default {
name: 'DeviceListModel',
@@ -76,24 +79,24 @@
},
data() {
return {
- title:'',
+ title: '',
visible: false,
disableMixinCreated: true,
queryParam: {},
columns: [{
- title: '璁惧缂栫爜',
+ title: '缁熶竴缂栫爜',
align: 'center',
- dataIndex: 'equipmentid',
+ dataIndex: 'equipmentid'
},
{
title: '璁惧鍚嶇О',
align: 'center',
- dataIndex: 'equipmentname',
+ dataIndex: 'equipmentname'
},
{
title: '璁惧鍨嬪彿',
align: 'center',
- dataIndex: 'equipmentmodel',
+ dataIndex: 'equipmentmodel'
},
// {
// title: '璁惧绫诲瀷',
@@ -103,27 +106,27 @@
{
title: '鏈哄簥IP',
align: 'center',
- dataIndex: 'equipmentip',
+ dataIndex: 'equipmentip'
},
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'drivetype',
+ dataIndex: 'drivetype'
},
{
title: '绔彛',
align: 'center',
- dataIndex: 'dataport',
+ dataIndex: 'dataport'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlsystem',
+ dataIndex: 'controlsystem'
}
],
url: {
- list: '/mdc/equipment/list',
- },
+ list: '/mdc/equipment/list'
+ }
}
},
@@ -134,23 +137,23 @@
openPage() {
this.visible = true
this.onClearSelected()
- this.dataSource = [];
+ this.dataSource = []
// this.queryParam = {
// status: this.status
// };
- this.loadData();
+ this.loadData()
},
getQueryParams() {
//鑾峰彇鏌ヨ鏉′欢
let sqp = {}
- if(this.superQueryParams){
- sqp['superQueryParams']=encodeURI(this.superQueryParams)
+ if (this.superQueryParams) {
+ sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
- var param = Object.assign(sqp, this.queryParam);
+ var param = Object.assign(sqp, this.queryParam)
// param.field = this.getQueryField();
- param.pageNo = this.ipagination.current;
- param.pageSize = this.ipagination.pageSize;
+ param.pageNo = this.ipagination.current
+ param.pageSize = this.ipagination.pageSize
//鑾峰彇鐢ㄦ埛瀹氬埗鐨勫弬鏁板睘鎬�
// if (this.getCustomQueryParams) {
// param = this.getCustomQueryParams(param);
@@ -159,42 +162,41 @@
// }
// }
- return filterObj(param);
+ return filterObj(param)
},
loadData(arg) {
- if(!this.url.list){
- this.$message.error("璇疯缃畊rl.list灞炴��!")
+ if (!this.url.list) {
+ this.$message.error('璇疯缃畊rl.list灞炴��!')
return
}
//鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
if (arg === 1) {
- this.ipagination.current = 1;
+ this.ipagination.current = 1
}
- var params = this.getQueryParams();//鏌ヨ鏉′欢
+ var params = this.getQueryParams()//鏌ヨ鏉′欢
- if(!params){
- return false;
+ if (!params) {
+ return false
}
- this.loading = true;
+ this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
// console.log(res)
//update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- this.dataSource = res.result.records||res.result;
- if(res.result.total)
- {
- this.ipagination.total = res.result.total;
- }else{
- this.ipagination.total = 0;
+ this.dataSource = res.result.records || res.result
+ if (res.result.total) {
+ this.ipagination.total = res.result.total
+ } else {
+ this.ipagination.total = 0
}
//update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
- }else{
+ } else {
// this.$message.warning(res.message)
this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
+ message: '娑堟伅',
+ description: res.message
+ })
}
}).finally(() => {
this.loading = false
@@ -208,18 +210,31 @@
// });
// return str;
},
+ customRow(record) {
+ return {
+ style: {
+ cursor: 'pointer'
+ },
+ on: {
+ click: () => {
+ console.log('瑙﹀彂鐐瑰嚮')
+ this.onSelectChange([record.equipmentid], [record])
+ }
+ }
+ }
+ },
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
- this.loadData();
- this.selectedRowKeys = [val.id];
+ this.loadData()
+ this.selectedRowKeys = [val.id]
},
searchQuery() {
- this.loadData();
+ this.loadData()
this.onClearSelected()
},
searchReset() {
this.queryParam = {}
- this.loadData();
+ this.loadData()
this.onClearSelected()
},
close() {
@@ -232,8 +247,8 @@
handleOk() {
this.$emit('sendSelectionRows', this.selectionRows[0])
this.close()
- },
- },
+ }
+ }
}
</script>
<style>
--
Gitblit v1.9.3