From 2f519ead537a0b38019bbf64a6075cbb6e08f9b4 Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期三, 09 七月 2025 13:53:01 +0800 Subject: [PATCH] 车间大屏看板设置设备默认图片 --- src/views/tms/requirement/modules/ToolsModal.vue | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 221 insertions(+), 0 deletions(-) diff --git a/src/views/tms/requirement/modules/ToolsModal.vue b/src/views/tms/requirement/modules/ToolsModal.vue index e69de29..04f76cf 100644 --- a/src/views/tms/requirement/modules/ToolsModal.vue +++ b/src/views/tms/requirement/modules/ToolsModal.vue @@ -0,0 +1,221 @@ +<template> + <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="7" :sm="7"> + <a-form-item label="宸ュ叿缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏风紪鐮佹绱�" v-model="queryParam.toolId"></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> + + <!-- table鍖哄煙-begin --> + <div> + <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns" + :dataSource="dataSource" :pagination="ipagination" :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" + @change="handleTableChange"> + </a-table> + </div> + <!-- table鍖哄煙-end --> + </a-card> + </a-modal> +</template> + +<script> +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import { getAction } from '@/api/manage' +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' +import JDate from '@/components/jeecg/JDate' +import { filterObj } from '@/utils/util' + +export default { + name: 'ToolsModal', + mixins: [JeecgListMixin], + components: { + JDictSelectTag, + JEllipsis, + JInput, + Tooltip, + JDate + }, + props: { + status: { + type: Number, + default: 1 + } + }, + data() { + return { + disableSubmit:false, + title: '', + visible: false, + disableMixinCreated: true, + queryParam: {}, + columns: [{ + title: '宸ュ叿缂栫爜', + align: 'center', + dataIndex: 'toolId' + }, + { + title: '宸ュ叿绫诲瀷', + align: 'center', + dataIndex: 'applicationType_dictText' + }, + // { + // title: '宸ュ叿缂栧彿', + // align: 'center', + // dataIndex: 'toolId' + // }, + { + title: '涓枃鍚嶇О', + align: 'center', + dataIndex: 'chineseName' + }, + { + title: '宸ュ叿鍙傛暟鏍囪瘑', + align: 'center', + dataIndex: 'paramaTableName_dictText' + }, + { + title: '鍨嬪彿/鍥惧彿', + align: 'center', + dataIndex: 'toolModel' + }, + { + title: '涓昏閲忓崟浣�', + align: 'center', + dataIndex: 'mainUnit' + } + ], + url: { + list: '/tms/baseTools/listWithSharpedAndConfig' + } + + } + }, + created() { + + }, + methods: { + showModals() { + this.selectedRowKeys = [] + this.visible = true + this.loadData(1) + }, + getQueryParams() { + //鑾峰彇鏌ヨ鏉′欢 + let sqp = {} + if (this.superQueryParams) { + sqp['superQueryParams'] = encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParam) + // param.field = this.getQueryField(); + param.pageNo = this.ipagination.current + param.pageSize = this.ipagination.pageSize + return filterObj(param) + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error('璇疯缃畊rl.list灞炴��!') + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1 + } + var params = this.getQueryParams()//鏌ヨ鏉′欢 + + if (!params) { + return false + } + + this.loading = true + getAction(this.url.list, params).then((res) => { + if (res.success) { + + this.dataSource = res.result.records || res.result + if (res.result.total) { + this.ipagination.total = res.result.total + } else { + this.ipagination.total = 0 + } + + } else { + // this.$message.warning(res.message) + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + this.loading = false + }) + }, + getQueryField() { + //TODO 瀛楁鏉冮檺鎺у埗 + // var str = ""; + // this.columns.forEach(function (value) { + // str += value.dataIndex +"," ; + // }); + // return str; + }, + modalFormOk(val) { + // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 + this.loadData() + this.selectedRowKeys = [val.id] + }, + searchQuery() { + this.loadData() + this.onClearSelected() + }, + searchReset() { + this.queryParam = {} + this.loadData() + this.onClearSelected() + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + handleOk() { + this.$emit('sendSelectionRows', this.selectionRows[0]) + this.close() + }, + } +} +</script> +<style> +@import '~@assets/less/common.less'; + +.frozenRowClass { + color: #c9c9c9; +} + +.success { + color: green; +} + +.error { + color: red; +} +</style> -- Gitblit v1.9.3