From 186022d0c99061dd3886e6ee995b335cf43fe10d Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 10 七月 2025 21:56:35 +0800 Subject: [PATCH] 1、保养规范页面列表新增测试删除功能(菜单权限分配,现网初期导入用) 2、保养规范弹窗新增区分保养项分类标签 --- src/views/system/SysParamsList.vue | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 214 insertions(+), 0 deletions(-) diff --git a/src/views/system/SysParamsList.vue b/src/views/system/SysParamsList.vue new file mode 100644 index 0000000..d066a27 --- /dev/null +++ b/src/views/system/SysParamsList.vue @@ -0,0 +1,214 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍙傛暟鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ弬鏁板悕绉�" v-model="queryParam.settingName"/> + </a-form-item> + </a-col> + + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + </span> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <!-- <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('绯荤粺鍙傛暟琛�')">瀵煎嚭</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">瀵煎叆</a-button> + </a-upload> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> --> + + <!-- table鍖哄煙-begin --> + <div> + <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + </div> --> + + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + class="j-table-force-nowrap" + @change="handleTableChange"> + <span slot="rowIndex" slot-scope="text, record, index"> + {{(ipagination.current-1)*ipagination.pageSize+index+1}} + </span> + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="uploadFile(text)"> + 涓嬭浇 + </a-button> + </template> + + <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-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> --> + <template> + <!-- <div v-if="record.settingValue=='OPEN'"> + <a-switch @click="edit(record)" checked-children="寮�" un-checked-children="鍏�" default-checked /> + </div> + <div v-else> + <a-switch @click="edit(record)" checked-children="寮�" un-checked-children="鍏�" /> + </div> --> + </template> + </span> + + <!-- 瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span slot="settingValue" slot-scope="text"> + <j-ellipsis :value="text"/> + </span> + </a-table> + </div> + + <sysParams-modal ref="modalForm" @ok="modalFormOk"></sysParams-modal> + </a-card> +</template> + +<script> + + import { httpAction } from '@/api/manage' + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import SysParamsModal from './modules/SysParamsModal' + import JDictSelectTag from '../../components/dict/JDictSelectTag.vue' + + export default { + name: "SysParamsList", + mixins:[JeecgListMixin, mixinDevice], + components: { + JDictSelectTag, + SysParamsModal, + }, + data () { + return { + description: '绯荤粺鍙傛暟琛ㄧ鐞嗛〉闈�', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + scopedSlots: { customRender: 'rowIndex' } + }, + { + title:'鍙傛暟鍚嶇О', + align:"center", + dataIndex: 'settingName' + }, + { + title:'鍙傛暟閿�', + align:"center", + dataIndex: 'settingKey' + }, + { + title:'鍙傛暟鍊�', + align:"center", + dataIndex: 'settingValue', + key: 'settingValue', + scopedSlots: { customRender: 'settingValue' } + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + // fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/system/sysParams/list", + delete: "/system/sysParams/delete", + deleteBatch: "/system/sysParams/deleteBatch", + exportXlsUrl: "/system/sysParams/exportXls", + importExcelUrl: "system/sysParams/importExcel", + edit: "/system/sysParams/edit", + }, + dictOptions:{}, + } + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + initDictConfig(){ + }, + edit(sysParams) { + if(sysParams.settingValue == "CLOSE"){ + sysParams.settingValue = "OPEN"; + }else{ + sysParams.settingValue = "CLOSE"; + } + const that = this; + httpAction("/system/sysParams/edit",sysParams,'put').then((res)=>{ + if(res.success){ + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + }, + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file -- Gitblit v1.9.3