From 8ebab38587cea151b5fee155a198a57b804c453f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 15 七月 2025 14:51:48 +0800
Subject: [PATCH] 前端
---
admin/src/views/business/categoryOld.vue | 106 +++++++++++++++++++++++++++++++++++
server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java | 4 -
admin/src/views/business/categoryCar.vue | 64 ++++++++++++--------
3 files changed, 144 insertions(+), 30 deletions(-)
diff --git a/admin/src/views/business/categoryCar.vue b/admin/src/views/business/categoryCar.vue
index 2ff4c1a..d27482b 100644
--- a/admin/src/views/business/categoryCar.vue
+++ b/admin/src/views/business/categoryCar.vue
@@ -13,7 +13,7 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
- <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鍒嗙被淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
+ <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鍝佺閰嶇疆',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
<li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
@@ -23,23 +23,24 @@
stripe
@selection-change="handleSelectionChange"
>
- <el-table-column type="selection" width="55"></el-table-column>
- <el-table-column prop="updateUser" label="鏇存柊浜虹紪鐮�" min-width="100px"></el-table-column>
- <el-table-column prop="updateTime" label="鏇存柊鏃堕棿" min-width="100px"></el-table-column>
- <el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
+ <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
<el-table-column prop="name" label="鍗曚綅鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column prop="isFixed" label="鏄惁鍥哄畾杞﹁締" min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.isFixed ==1" >鏄�</span>
+ <span v-else >鍚�</span>
+ </template>
+ </el-table-column>
<el-table-column label="鐘舵��">
<template slot-scope="{row}">
- <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
- inactive-color="#ff4949" :active-value="0" :inactive-value="1">
+ <el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
+ inactive-color="#ff4949" :active-value="0" :inactive-value="1">
</el-switch>
</template>
</el-table-column>
- <el-table-column prop="type" label="绫诲瀷:0=鍝佺閰嶇疆锛�1=杞﹁締绫诲瀷閰嶇疆锛�2=椁愭爣閰嶇疆锛�3=鎵嬬画璐归厤缃紱" min-width="100px"></el-table-column>
- <el-table-column prop="detail" label="鍐呭锛堣溅杈嗚鏍笺�侀鏍囥�佹墜缁垂姣斾緥锛�" min-width="100px"></el-table-column>
- <el-table-column prop="icon" label="鍥炬爣锛堣溅杈嗙被鍨嬩娇鐢級" min-width="100px"></el-table-column>
- <el-table-column prop="isFixed" label="鏄惁鍥哄畾杞﹁締锛堣溅杈嗙被鍨嬩娇鐢級:0=鍚︼紱1=鏄紱" min-width="100px">
- </el-table-column>
+ <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="100px"></el-table-column>
+ <el-table-column prop="updateUserName" label="鎿嶄綔浜�" min-width="100px"></el-table-column>
+ <el-table-column prop="updateTime" label="鏈�杩戞搷浣滄椂闂�" min-width="150px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:category:update', 'business:category:delete'])"
label="鎿嶄綔"
@@ -47,8 +48,8 @@
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaCategoryWindow.open('缂栬緫鍒嗙被淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:category:update']">缂栬緫</el-button>
- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button>
+ <el-button type="text" v-if="row.isFixed != 1" @click="$refs.operaCategoryWindow.open('缂栬緫鏂板缓鍝佺閰嶇疆', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">缂栬緫</el-button>
+ <el-button type="text" v-if="row.isFixed != 1" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -77,19 +78,8 @@
return {
// 鎼滅储
searchForm: {
- id: '',
- deleted: '',
- status: '',
- createUser: '',
- createTime: '',
- updateUser: '',
- updateTime: '',
- remark: '',
name: '',
- type: '',
- detail: '',
- icon: '',
- isFixed: ''
+ type: 1
}
}
},
@@ -101,6 +91,28 @@
'field.main': 'id'
})
this.search()
+ },
+ methods: {
+ isChangeSelected(row,index){
+ if(row.isFixed ==1) {
+ return false
+ }
+ return true
+ },
+ changeStatus (e, row) {
+ this.working = true
+ this.api.updateStatus({ id: row.id, status: e })
+ .then(res => {
+ this.$tip.apiSuccess(res || '鎿嶄綔鎴愬姛')
+ this.search()
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.working = false
+ })
+ }
}
}
</script>
diff --git a/admin/src/views/business/categoryOld.vue b/admin/src/views/business/categoryOld.vue
new file mode 100644
index 0000000..2ff4c1a
--- /dev/null
+++ b/admin/src/views/business/categoryOld.vue
@@ -0,0 +1,106 @@
+<template>
+ <TableLayout :permissions="['business:category:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="鍚嶇О" prop="name">
+ <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
+ <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('鏂板缓鍒嗙被淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:category:create']">鏂板缓</el-button></li>
+ <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button></li>
+ </ul>
+ <el-table
+ :height="tableHeightNew"
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column prop="updateUser" label="鏇存柊浜虹紪鐮�" min-width="100px"></el-table-column>
+ <el-table-column prop="updateTime" label="鏇存柊鏃堕棿" min-width="100px"></el-table-column>
+ <el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="鍗曚綅鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column label="鐘舵��">
+ <template slot-scope="{row}">
+ <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
+ inactive-color="#ff4949" :active-value="0" :inactive-value="1">
+ </el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column prop="type" label="绫诲瀷:0=鍝佺閰嶇疆锛�1=杞﹁締绫诲瀷閰嶇疆锛�2=椁愭爣閰嶇疆锛�3=鎵嬬画璐归厤缃紱" min-width="100px"></el-table-column>
+ <el-table-column prop="detail" label="鍐呭锛堣溅杈嗚鏍笺�侀鏍囥�佹墜缁垂姣斾緥锛�" min-width="100px"></el-table-column>
+ <el-table-column prop="icon" label="鍥炬爣锛堣溅杈嗙被鍨嬩娇鐢級" min-width="100px"></el-table-column>
+ <el-table-column prop="isFixed" label="鏄惁鍥哄畾杞﹁締锛堣溅杈嗙被鍨嬩娇鐢級:0=鍚︼紱1=鏄紱" min-width="100px">
+ </el-table-column>
+ <el-table-column
+ v-if="containPermissions(['business:category:update', 'business:category:delete'])"
+ label="鎿嶄綔"
+ min-width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaCategoryWindow.open('缂栬緫鍒嗙被淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:category:update']">缂栬緫</el-button>
+ <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ >
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaCategoryWindow ref="operaCategoryWindow" @success="handlePageChange"/>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaCategoryWindow from '@/components/business/OperaCategoryWindow'
+export default {
+ name: 'Category',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaCategoryWindow },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ id: '',
+ deleted: '',
+ status: '',
+ createUser: '',
+ createTime: '',
+ updateUser: '',
+ updateTime: '',
+ remark: '',
+ name: '',
+ type: '',
+ detail: '',
+ icon: '',
+ isFixed: ''
+ }
+ }
+ },
+ created () {
+ this.config({
+ module: '鍒嗙被淇℃伅琛�',
+ api: '/business/category',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ }
+}
+</script>
diff --git a/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java b/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
index aa13767..a9f3b7f 100644
--- a/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
+++ b/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
@@ -405,8 +405,4 @@
);
}
-
-
-
-
}
--
Gitblit v1.9.3