From 56a935840efd811b0363b4e0803f716c2f1214a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Mon, 9 Mar 2026 14:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=9E=E6=80=A7=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/properties.js | 6 - .../base/propertiesItem/propertiesModel.vue | 278 +----------------- 2 files changed, 9 insertions(+), 275 deletions(-) diff --git a/src/api/base/properties.js b/src/api/base/properties.js index 5764ae2..ff9c051 100644 --- a/src/api/base/properties.js +++ b/src/api/base/properties.js @@ -1,6 +1,5 @@ import { createAPI } from "@/utils/httpRequest.js"; -export const searchMenuAllListId= (data) => createAPI(`/properties/menu/list`,'post',data) export const propertiesItemSearch = data => createAPI(`/properties/propertiesItemSearch`,'post',data) export const propertiesItemSave = data => createAPI(`/properties/propertiesItemSave`,'post',data) export const propertiesItemEdit = data => createAPI(`/properties/propertiesItemEdit`,'post',data) @@ -21,10 +20,5 @@ export const deleteItemAvailable = data => createAPI(`/properties/deleteItemAvai export const goUpItem= data => createAPI(`/properties/goUpItem`,'post',data) export const goDownItem= data => createAPI(`/properties/goDownItem`,'post',data) -export const searchBUList= (data) => createAPI(`/properties/bu/list`,'post',data) -export const searchPropertiesGroup= (data) => createAPI(`/properties/group/list`,'post',data) -export const searchBUPropertiesList= (data) => createAPI(`/bu/properties/list`,'post',data) -export const saveBUPropertiesList= (data) => createAPI(`/bu/properties/save`,'post',data) export const searchAllItemTypeList= (data) => createAPI(`/properties/item/type/list`,'post',data) export const searchAllTypeList= (data) => createAPI(`/properties/type/list`,'get',data) -export const searchAllTypeRelationshipList = (data) => createAPI(`/properties/type/relationship/list`,'post',data) diff --git a/src/views/modules/base/propertiesItem/propertiesModel.vue b/src/views/modules/base/propertiesItem/propertiesModel.vue index 8cb9485..965c6fc 100644 --- a/src/views/modules/base/propertiesItem/propertiesModel.vue +++ b/src/views/modules/base/propertiesItem/propertiesModel.vue @@ -7,11 +7,6 @@ - - - - - @@ -24,18 +19,6 @@ - - - - - - - - - - - - @@ -119,7 +102,7 @@ fixed="right" header-align="center" align="center" - width="160" + width="130" label="操作"> @@ -147,55 +129,24 @@ @close="()=>{this.$refs.modeForm.resetFields();}" v-drag :visible.sync="modalFlag" width="500px"> - + - + - + - - - - - - - - + - - - - - - - - - - - - - - - - - - + @@ -421,25 +372,6 @@ - - - - - - - - - - - - - - 保存 - 关闭 - - @@ -457,10 +389,7 @@ import { deleteModalDetail, // 单删 goUpItem, goDownItem, - saveBUPropertiesList, searchAllTypeList, searchAllTypeRelationshipList, - searchBUList, - searchBUPropertiesList, - searchMenuAllListId, + searchAllTypeList, } from "@/api/base/properties.js" import Chooselist from '@/views/modules/common/Chooselist' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -502,13 +431,7 @@ export default { }, data() { return { - relationshipList:[], - copyRelationshipList:[], typeList:[], - selectionBU: [], - BUDialog: false, - BUList: [], - menuList: [], // 是否收藏 favorite: false, // 导出 start @@ -521,13 +444,10 @@ export default { tagNo: '', searchData: { site: this.$store.state.user.site, - group: '', - buNo: '', codeNo: '', codeDesc: '', active: 'Y', functionType: '', - functionGroup:'', page: 1, limit: 10, }, @@ -544,8 +464,6 @@ export default { codeDesc: '', active: '', functionType: '', - functionGroup: '', - group: '', userId: this.$store.state.user.name, createdBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, @@ -578,23 +496,6 @@ export default { status: true, fixed: '', },{ - userId: this.$store.state.user.name, - functionId: 100002001, - serialNumber: '100002001TableFunctionType', - tableId: "100002001Table", - tableName: "属性项目表", - columnProp: 'functionGroupDesc', - headerAlign: "center", - align: "center", - columnLabel: '模板类型', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { userId: this.$store.state.user.name, functionId: 100002001, serialNumber: '100002001TableCodeNo', @@ -900,13 +801,6 @@ export default { trigger: 'change' } ], - functionGroup: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], } } }, @@ -916,41 +810,10 @@ export default { }) }, async created() { - await this.searchBUList(); - await this.searchMenuList(); await this.searchAllTypeList(); + this.getDataList(); }, methods: { - changeMenu(val){ - if (this.modalFlag){ - this.modalData.functionGroup=''; - }else { - this.searchData.functionGroup = ''; - } - this.getDataList(); - this.searchAllTypeRelationshipList(val) - // this.$nextTick(()=>{ - // this.$refs[ref].initOption(); - // }) - }, - searchAllTypeRelationshipList(args){ - let params={ - functionType: args - } - searchAllTypeRelationshipList(params).then(({data})=>{ - if (data && data.code === 0){ - if (this.modalFlag){ - this.copyRelationshipList = data.rows; - }else { - this.relationshipList = data.rows; - } - }else { - this.$message.warning(data.msg) - } - }).catch((error) => { - this.$message.error(error) - }) - }, searchAllTypeList(){ searchAllTypeList().then(({data})=>{ if (data && data.code === 0) { @@ -962,45 +825,6 @@ export default { this.$message.error(error) }) }, - searchMenuList() { - let params = { - site: this.$store.state.user.site - } - searchMenuAllListId(params).then(({data}) => { - if (data && data.code === 0) { - this.menuList = data.rows; - if (this.menuList.length > 0) { - this.searchData.group = this.menuList[0].menuId - // this.searchData.menuList.push(this.menuList[0].menuId) - } - this.getDataList(); - // this.$nextTick(()=>{ - // this.$refs.dictDataSelect.initOption(); - // }) - } else { - this.$message.warning(data.msg) - } - }).catch((error) => { - this.$message.error(error) - }) - }, - searchBUList() { - let params = { - site: this.$store.state.user.site - } - searchBUList(params).then(({data}) => { - if (data && data.code === 0) { - this.BUList = data.rows; - // if (this.BUList.length > 0) { - // this.searchData.buNo = this.BUList[0].buNo - // } - } else { - this.$message.warning(data.msg) - } - }).catch((error) => { - this.$message.error(error) - }) - }, // 获取基础数据列表S getBaseList(val, type) { this.tagNo = val @@ -1081,19 +905,13 @@ export default { codeNo: '', codeDesc: '', active: 'Y', - functionType: `${this.searchData.functionType?this.searchData.functionType:'555'}`, - functionGroup: `${this.searchData.functionGroup?this.searchData.functionGroup:'666'}`, - group: `${this.searchData.group?this.searchData.group:''}`, + functionType: this.searchData.functionType || '', userId: this.$store.state.user.name, createdBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, }; this.modalDisableFlag = false; - this.copyRelationshipList = this.relationshipList this.modalFlag = true; - this.$nextTick(()=>{ - this.$refs['dialogDictDataSelect'].initOption(); - }) }, updateModal(row) { @@ -1103,9 +921,7 @@ export default { codeNo: row.codeNo, codeDesc: row.codeDesc, active: row.active, - group: row.group, functionType: row.functionType, - functionGroup: row.functionGroup, userId: this.$store.state.user.name, updateBy: this.$store.state.user.name, }; @@ -1158,12 +974,6 @@ export default { return false } if (this.modalData.functionType === '') { - this.$alert('选择模板类型!', '错误', { - confirmButtonText: '确定' - }) - return false - } - if (this.modalData.functionGroup === '') { this.$alert('选择模板分组!', '错误', { confirmButtonText: '确定' }) @@ -1381,78 +1191,8 @@ export default { }) }, - BUBtnDialog(row) { - this.modalData = row - searchBUPropertiesList(row).then(({data}) => { - if (data && data.code === 0) { - this.selectionBU = data.row.map(item => item.buNo); - this.BUDialog = true - } else { - this.$message.warning(data.msg) - } - }).catch((error) => { - this.$message.error(error) - }) - }, - savePropertiesBU() { - // if (this.selectionBU.length === 0) { - // this.$message.warning("未选择BU") - // return - // } - let arr = this.selectionBU.map(item => { - return { - site: this.$store.state.user.site, - buNo: item, - functionType: this.modalData.functionType, - codeNo: this.modalData.codeNo - } - }); - if (arr.length === 0){ - arr[0] = { - site: this.$store.state.user.site, - functionType: this.modalData.functionType, - codeNo: this.modalData.codeNo - } - } - saveBUPropertiesList(arr).then(({data}) => { - if (data && data.code === 0) { - this.$message.success(data.msg) - this.getDataList() - this.BUDialog = false - } else { - this.$message.warning(data.msg) - } - }).catch((error) => { - this.$message.error(error) - }) - }, } }