From 5339f63a6ab4611681b8ffd0a295193b1f5986b6 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 27 五月 2024 14:16:20 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/education/index.vue | 95 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 82 insertions(+), 13 deletions(-)
diff --git a/src/views/knowledge/education/index.vue b/src/views/knowledge/education/index.vue
index 036f7e9..de1d072 100644
--- a/src/views/knowledge/education/index.vue
+++ b/src/views/knowledge/education/index.vue
@@ -39,6 +39,17 @@
>
</el-button>
</span>
+ <span v-if="data.id > 0">
+ <el-button
+ type="text"
+ circle
+ size="mini"
+ @click="() => altertag(node, data)"
+ ><span class="button-textxg"
+ ><i class="el-icon-edit-outline"></i
+ ></span>
+ </el-button>
+ </span>
</span>
</el-tree>
</div>
@@ -181,9 +192,16 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="搴忓彿" align="center" key="id" prop="id" />
+ <el-table-column
+ label="搴忓彿"
+ fixed
+ align="center"
+ key="id"
+ prop="id"
+ />
<el-table-column
label="鏍囬"
+ fixed
align="center"
key="preachname"
prop="preachname"
@@ -233,9 +251,14 @@
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
- <span v-for="item in scope.row.labelInfo.split(',')"
- >{{ item }}銆�
- </span>
+ <div v-if="scope.row.labelInfo">
+ <span v-for="item in scope.row.labelInfo.split(',')"
+ >{{ item }}銆�
+ </span>
+ </div>
+ <div v-else>
+ <span>鏃�</span>
+ </div>
</template>
</el-table-column>
<el-table-column
@@ -245,12 +268,17 @@
prop="suitway"
width="120"
>
- <template slot-scope="scope">
- <span v-for="item in scope.row.suitway.split(',')"
- >{{ item }}銆�
- </span>
+ <template slot-scope="scope">
+ <div v-if="scope.row.suitway">
+ <span v-for="item in scope.row.suitway.split(',')"
+ >{{ item }}銆�
+ </span>
+ </div>
+ <div v-else>
+ <span>鏃�</span>
+ </div>
</template>
- </el-table-column>
+ </el-table-column>
<el-table-column
label="鍐呭褰㈠紡"
align="center"
@@ -286,6 +314,7 @@
<el-table-column
label="鎿嶄綔"
+ fixed="right"
align="center"
width="300"
class-name="small-padding fixed-width"
@@ -372,7 +401,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
+ <el-button @click="getDeptTree()">鍙� 娑�</el-button>
<el-button type="primary" @click="submitsidecolumn">纭� 瀹�</el-button>
</div>
</el-dialog>
@@ -441,6 +470,7 @@
getheLibraryAssort,
delheLibraryAssort,
addheLibraryAssort,
+ editheLibraryAssort,
addtargetillness,
getlibrarylist,
dellibraryinfo,
@@ -561,10 +591,12 @@
methods: {
/** 鏌ヨ瀹f暀鍒楄〃 */
getList() {
- // this.loading = true;
+ this.loading = true;
getlibrarylist(this.queryParams).then((response) => {
console.log(response);
this.userList = response.rows;
+ this.total = response.total;
+ this.loading = false;
});
listDept(this.queryParams).then((response) => {
this.deptList = this.handleTree(response.data, "deptId");
@@ -652,12 +684,21 @@
getDeptTree() {
getheLibraryAssort({}).then((res) => {
this.deptOptions = res.rows;
- console.log(res);
+ this.dialogFormVisible = false;
});
},
// 娣诲姞绫诲埆鏍�
submitsidecolumn() {
+ if (this.classifyform.id) {
+ editheLibraryAssort(this.classifyform).then((res) => {
+ this.getDeptTree();
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
+ });
+ return;
+ }
let calssvalue = {};
if (
this.classifyform.pid &&
@@ -710,6 +751,16 @@
})
.catch(() => {});
}
+ },
+ altertag(a, b) {
+ this.dialogFormVisible = true;
+ if (!b.pid) {
+ this.radio = "涓诲垎绫�";
+ } else {
+ this.radio = "瀛愬垎绫�";
+ }
+ this.classifyform = b;
+ this.dialogFormVisible = true;
},
// 绛涢�夎妭鐐�
@@ -809,7 +860,7 @@
margin-top: 20px;
margin: 20px;
padding: 30px;
- background: #edf1f7;
+ background: #fff;
border: 1px solid #dcdfe6;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
@@ -924,6 +975,24 @@
font-size: 20px;
cursor: pointer;
}
+::v-deep .el-tree {
+ position: relative;
+ cursor: default;
+ border-radius: 5px;
+ background: #eff8fe;
+ color: #606266;
+ border: 1px solid #bbe1fa;
+ // border: 1px solid #dcdfe6;
+ -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
+ 0 0 6px 0 rgba(0, 0, 0, 0.04);
+}
+::v-deep
+ .el-tree--highlight-current
+ .el-tree-node.is-current
+ > .el-tree-node__content {
+ background-color: #7799fb;
+ color: #fff;
+}
::v-deep .el-button--mini.is-circle {
padding: 7px;
margin: 0;
--
Gitblit v1.9.3