From ad70f145e8bea957b41043b4a1e37ce37cc5ed1e Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 16 一月 2024 18:39:24 +0800
Subject: [PATCH] 指标完成
---
src/views/knowledge/education/compilequer/index.vue | 77 ++++++++++++++++++--------------------
1 files changed, 36 insertions(+), 41 deletions(-)
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index fb07522..40afd79 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -28,14 +28,19 @@
filterable
placeholder="璇烽�夋嫨鍒嗙被"
>
- <el-option
- class="ruleFormaa"
- v-for="item in sortlist"
- :key="item.id"
- :label="item.assortname"
- :value="item.id"
+ <el-option-group
+ v-for="group in sortlist"
+ :key="group.id"
+ :label="group.assortname"
>
- </el-option>
+ <el-option
+ v-for="item in group.heLibraryAssortList"
+ :key="item.id"
+ :label="item.assortname"
+ :value="item.id"
+ >
+ </el-option>
+ </el-option-group>
</el-select>
</el-form-item>
<el-form-item label="瀹f暀鏍囬" prop="preachname">
@@ -43,9 +48,9 @@
<el-input v-model="ruleForm.preachname"></el-input>
</div>
</el-form-item>
- <el-form-item label="瀹f暀鎻忚堪" prop="preachdescription">
+ <el-form-item label="瀹f暀鎻忚堪" prop="preachcontent">
<div style="width: 30%">
- <el-input v-model="ruleForm.preachdescription"></el-input>
+ <el-input v-model="ruleForm.preachcontent"></el-input>
</div>
</el-form-item>
<el-form-item label="閫氱煡鍙橀噺" prop="name">
@@ -256,7 +261,9 @@
<el-button type="success" @click="nextstep('ruleForm')"
>涓嬩竴姝�</el-button
>
- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+ <el-button type="success" @click="Departmenttreatment('ruleForm')"
+ >淇濆瓨</el-button
+ >
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
</el-form-item>
</el-form>
@@ -537,34 +544,27 @@
methods: {
getList() {
this.loading = true;
- getlibraryinfo({ id: this.$route.query.id }).then((res) => {
- this.ruleForm = res.data;
- this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
- this.ruleForm.suitway = this.ruleForm.suitway.split(",");
- this.variablelist = JSON.parse(this.ruleForm.otherdata)
+ this.id = this.$route.query.id;
+ getlibraryinfo({ id: this.id }).then((res) => {
+ this.ruleForm = res.data[0];
+
+ if (this.ruleForm.deptNames) {
+ this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
+ }
+ if (this.ruleForm.suitway) {
+ this.ruleForm.suitway = this.ruleForm.suitway.split(",");
+ }
+ this.variablelist = this.ruleForm.otherdata
? JSON.parse(this.ruleForm.otherdata)
: this.variablelist;
});
getheLibraryAssort({}).then((res) => {
this.sortlist = res.rows;
- console.log(res);
});
listDept(this.queryParams).then((response) => {
this.deptList = this.handleTree(response.data, "deptId");
});
this.loading = false;
- },
- /** 鏌ヨ鏍囩鍒楄〃 */
- gettabList() {
- const tagqueryParams = {
- pageNum: 1,
- pageSize: 1000,
- tagcategoryid: "0",
- };
- listtag(tagqueryParams).then((response) => {
- console.log(response);
- this.optionstag = response.rows;
- });
},
submitForm(formName) {
@@ -572,9 +572,15 @@
this.dynamicTags.forEach((item) => {
tgs.push(item.tagname);
});
- this.ruleForm.labelInfo = tgs.join(",");
+ console.log(tgs.length, "tgs");
+
+ this.ruleForm.labelInfo = tgs.length != 0 ? tgs.join(", ") : "";
this.ruleForm.otherdata = JSON.stringify(this.variablelist);
- this.ruleForm.suitway = this.ruleForm.suitway.join(",");
+ console.log(22);
+ this.ruleForm.suitway =
+ this.ruleForm.suitway.length != 0
+ ? this.ruleForm.suitway.join(",")
+ : "";
if (this.id) {
this.ruleForm.isoperation = 2;
compilelibrary(this.ruleForm).then((response) => {
@@ -619,11 +625,9 @@
// 绉戝澶勭悊
Departmenttreatment() {
this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist);
- console.log(this.tempDetpRelevanceslist);
const result = this.tempDetpRelevanceslist.map(
(subArr) => subArr[subArr.length - 1]
);
- console.log(result);
// id鏁扮粍鏌ユ暟缁勫璞�
result.forEach((item) => {
const condition = this.ruleForm.tempDetpRelevances.some(
@@ -631,13 +635,11 @@
);
if (!condition) {
listDept({ deptId: item }).then((res) => {
- console.log(res.data[0]);
res.data[0].type = 2;
this.ruleForm.tempDetpRelevances.push(res.data[0]);
});
}
});
- console.log(this.ruleForm.tempDetpRelevances);
// 鏁扮粍瀵硅薄鏌d鏁扮粍
this.ruleForm.tempDetpRelevances.forEach((item) => {
const condition = result.some((obj) => obj === item.deptId);
@@ -646,7 +648,6 @@
this.ruleForm.tempDetpRelevances[index].delFlag = 1;
}
});
- console.log(this.ruleForm.tempDetpRelevances);
setTimeout(() => {
this.submitForm();
}, 1000);
@@ -684,13 +685,10 @@
tagcategoryid: "0",
};
listtag(tagqueryParams).then((response) => {
- console.log(response);
this.optionstag = response.rows;
});
},
handleClosetag(tag) {
- console.log(tag);
- console.log(this.dynamicTags.indexOf(tag));
const lindex = this.dynamicTags.indexOf(tag);
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
this.ruleForm.heLibraryTagList[lindex].isoperation = 3;
@@ -745,12 +743,10 @@
pageSize: 100,
};
getillnesslist(illnessqueryParams).then((response) => {
- console.log(response);
this.optionsillness = response.rows;
});
getillness({ outid: this.$route.query.id, type: 6 }).then((res) => {
this.illnesslist = res.rows;
- console.log(res);
});
},
handleCloseillness(tag) {
@@ -760,7 +756,6 @@
}
},
remoteMethod(value) {
- console.log(value);
const illnessqueryParams = {
pageNum: 1,
pageSize: 100,
--
Gitblit v1.9.3