From 3b774a197bd7087ee42999937ccc1e7e048eb1aa Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 11 一月 2024 18:03:17 +0800
Subject: [PATCH] 指标完成
---
src/api/AiCentre/index.js | 2
src/views/repositoryai/templateku/configurat/index.vue | 320 ++++--
src/api/AiCentre/Qtemplate.js | 2
src/views/shortmessage/healthinformation/index.vue | 56
src/views/knowledge/questionnaire/compilequer/index.vue | 350 ++++---
src/views/repositoryai/verbaltrick/particulars/index.vue | 174 ++-
src/views/knowledge/questionbank/particulars/index.vue | 354 +++++--
src/api/AiCentre/Hetask.js | 49 +
src/store/getters.js | 97 +
src/store/modules/regular.js | 72 +
src/views/knowledge/education/compilequer/index.vue | 213 +++-
src/views/repositoryai/verbaltrick/index.vue | 16
src/api/AiCentre/questionnaire.js | 2
src/store/index.js | 2
src/views/system/dept/index.vue | 190 +++-
src/views/knowledge/questionbank/index.vue | 78 +
src/views/knowledge/education/index.vue | 113 +
src/utils/request.js | 2
src/views/repositoryai/general/index.vue | 17
src/components/Regular/index.vue | 294 ++++++
src/views/repositoryai/general/particulars/index.vue | 4
src/views/knowledge/questionnaire/index.vue | 85
src/views/repositoryai/intention/index.vue | 31
src/views/patient/propaganda/particty.vue | 11
src/views/repositoryai/templateku/index.vue | 61
25 files changed, 1,806 insertions(+), 789 deletions(-)
diff --git a/src/api/AiCentre/Hetask.js b/src/api/AiCentre/Hetask.js
new file mode 100644
index 0000000..b495da4
--- /dev/null
+++ b/src/api/AiCentre/Hetask.js
@@ -0,0 +1,49 @@
+import request from "@/utils/request";
+
+// 鏌ヨ瀹f暀浠诲姟鍒楄〃
+export function gethetasklist(data) {
+ return request({
+ url: "/smartor/hetask/list",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鍒犻櫎瀹f暀浠诲姟
+export function delhetaskinfo(Id) {
+ return request({
+ url: "/smartor/hetask/remove/" + Id,
+ method: "get",
+ });
+ }
+ // 鏌ヨ瀹f暀浠诲姟璇︽儏鍒楄〃
+ export function gethetaskinfo(Id) {
+ return request({
+ url: "/smartor/hetask/" + Id,
+ method: "get",
+ });
+ }
+// 鏂板妯$増
+export function addhetask(data) {
+ return request({
+ url: "/smartor/hetask/add",
+ method: "post",
+ data: data,
+ });
+ }
+// 淇敼瀹f暀浠诲姟
+ export function edithetask(data) {
+ return request({
+ url: "/smartor/hetask/edit",
+ method: "post",
+ data: data,
+ });
+ }
+ // 鑾峰彇鎮h�呬俊鎭�
+ export function getTaskpatient(data) {
+ return request({
+ url: "/smartor/hetask/getPatientInfo",
+ method: "post",
+ data: data,
+ });
+ }
\ No newline at end of file
diff --git a/src/api/AiCentre/Qtemplate.js b/src/api/AiCentre/Qtemplate.js
index 3ffe179..b34befe 100644
--- a/src/api/AiCentre/Qtemplate.js
+++ b/src/api/AiCentre/Qtemplate.js
@@ -50,7 +50,7 @@
// 鏌ヨ闂嵎妯$増鍒嗙被鏍�
export function getQtemplateclassify(data) {
return request({
- url: "/smartor/svyLibTitleCategory/selectIvrLibasvytitleList",
+ url: "/smartor/svyLibTitleCategory/list",
method: "post",
data: data,
});
diff --git a/src/api/AiCentre/index.js b/src/api/AiCentre/index.js
index bb246c2..c470a54 100644
--- a/src/api/AiCentre/index.js
+++ b/src/api/AiCentre/index.js
@@ -5,4 +5,6 @@
export * from './publicity'
export * from './Qtemplate'
export * from './questionnaire'
+export * from './Hetask'
+
diff --git a/src/api/AiCentre/questionnaire.js b/src/api/AiCentre/questionnaire.js
index ad2942d..15bb16b 100644
--- a/src/api/AiCentre/questionnaire.js
+++ b/src/api/AiCentre/questionnaire.js
@@ -50,7 +50,7 @@
// 鏌ヨ闂嵎闂鍒嗙被鏍�
export function getissueclassify(data) {
return request({
- url: "/smartor/svyLibTopicCategory/selectIvrLibasvytitleList",
+ url: "/smartor/svyLibTopicCategory/list",
method: "post",
data: data,
});
diff --git a/src/components/Regular/index.vue b/src/components/Regular/index.vue
new file mode 100644
index 0000000..f9f20de
--- /dev/null
+++ b/src/components/Regular/index.vue
@@ -0,0 +1,294 @@
+<template>
+ <div>
+ <div class="topicxq" v-for="item in TargetoptionList">
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="閫夐」鍚�">
+ <el-input
+ type="text"
+ placeholder="璇疯緭鍏�"
+ v-model="item.targetvalue"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ <el-col :span="12"
+ ><el-form-item label="鑺傜偣ID">
+ <el-input
+ type="text"
+ placeholder="璇疯緭鍏ヨ妭鐐�"
+ v-model="item.targetid"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="澶勭悊">
+ <el-input
+ type="text"
+ placeholder="(榛樿)鏃犲0"
+ v-model="item.text"
+ maxlength="10"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ <el-col :span="12"
+ ><el-form-item label="閫変腑璺宠浆(缂�)">
+ <el-input
+ type="text"
+ placeholder="璇疯緭鍏ラ鐩妭鐐�"
+ v-model="item.jump"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-form-item label="鍏抽敭瀛�(鍚�)" prop="desc">
+ <div class="xinz-inf">
+ <el-tag
+ :key="crux"
+ type="success"
+ v-for="crux in dynamiccruxs"
+ closable
+ :disable-transitions="false"
+ @close="handleClosecrux(crux)"
+ >
+ {{ crux }}
+ </el-tag>
+ <el-select
+ v-model="inputValue"
+ v-if="inputVisible"
+ @change="handleInputConfirm"
+ filterable
+ remote
+ reserve-keyword
+ default-first-option
+ :loading="loading"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in regular"
+ :key="item.label"
+ :label="item.label"
+ :value="item.label"
+ >
+ </el-option>
+ </el-select>
+ <el-button
+ v-else
+ class="button-new-tag"
+ size="small"
+ @click="showInput"
+ >+ 鏂板</el-button
+ >
+ </div>
+ </el-form-item>
+ <el-form-item label="鍏抽敭瀛�(闈�)" prop="desc">
+ <div class="xinz-inf">
+ <el-tag
+ :key="crux"
+ type="warning"
+ v-for="crux in nodynamiccruxs"
+ closable
+ :disable-transitions="false"
+ @close="handleClosecrux(crux)"
+ >
+ {{ crux }}
+ </el-tag>
+ <el-select
+ v-model="inputValue"
+ v-if="noinputVisible"
+ @change="handleInputConfirm"
+ filterable
+ remote
+ reserve-keyword
+ default-first-option
+ :loading="loading"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in noregular"
+ :key="item.value"
+ :label="item.label"
+ :value="item.label"
+ >
+ </el-option>
+ </el-select>
+ <el-button
+ v-else
+ class="button-new-tag"
+ size="small"
+ @click="showInputno"
+ >+ 鏂板</el-button
+ >
+ </div>
+ </el-form-item>
+
+ <el-row :gutter="10">
+ <el-col :span="16">
+ <el-form-item label="璇煶鏂囦欢">
+ <el-upload
+ class="upload-demo"
+ style="display: flex"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :on-change="handleChange"
+ :file-list="fileList"
+ :limit="1"
+ :on-exceed="handleExceed"
+ >
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ </el-upload>
+ </el-form-item></el-col
+ >
+ <el-col :span="8">
+ <div style="text-align: right; padding-right: 10px">
+ <el-button type="danger" @click="deloption(item)" round
+ >鍒犻櫎</el-button
+ >
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+</template>
+
+<script>
+import store from "@/store";
+
+export default {
+ data() {
+ return {
+ zz1: "^(?!.涓�)(.(鎴憒浣爘浠東鍙互|鏄瘄濂絴鐭ラ亾|娌¢敊)+.*)$",
+ zz2: "^(?!.涓�)(?=.?(鎴憒浣爘浠東鍙互|鏄瘄濂絴鐭ラ亾|娌¢敊)).*$",
+ fileList: [
+ {
+ name: "food.jpeg",
+ url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
+ },
+ ],
+ whether: 1, //1涓哄叧閿瘝锛�2涓哄惁瀹氬叧閿瘝
+ inputValue: "",
+ inputVisible: false,
+ noinputVisible: false,
+ loading: false,
+ regular: [],
+ noregular: [],
+ nodynamiccruxs: ["鍒�"],
+ dynamiccruxs: ["濂�"],
+ };
+ },
+ props: {
+ TargetoptionList: {
+ type: Array,
+ required: true,
+ default: () => [],
+ },
+ },
+
+ created() {
+ this.regular = store.getters.regular;
+ this.noregular = store.getters.noregular;
+ },
+
+ methods: {
+ // 鐢熸垚姝e垯
+ generateRegex() {
+ let regex = "";
+ let regexno = "";
+ let hostregex = "";
+
+ for (let i = 0; i < this.dynamiccruxs.length; i++) {
+ regex += `${this.dynamiccruxs[i]}|`;
+ }
+ for (let i = 0; i < this.nodynamiccruxs.length; i++) {
+ regexno += `${this.nodynamiccruxs[i]}|`;
+ }
+ regex = regex.slice(0, -1);
+ regexno = regexno.slice(0, -1);
+
+ hostregex = "^(?!." + `${regexno}` + ")(.(" + `${regex}` + ")+.*)$";
+ console.log(hostregex);
+ },
+ // 鎺у埗鏂囦欢
+ handleChange(file, fileList) {
+ this.fileList = fileList.slice(-3);
+ },
+ // 鏂囦欢瓒呭嚭涓暟闄愬埗鏃剁殑閽╁瓙
+ handleExceed(files, fileList) {
+ this.$message.warning(
+ `褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${
+ files.length + fileList.length
+ } 涓枃浠禶
+ );
+ },
+
+ handleClosecrux(crux) {
+ if (this.whether == 1) {
+ this.dynamiccruxs.splice(this.dynamiccruxs.indexOf(crux), 1);
+ } else {
+ this.nodynamiccruxs.splice(this.nodynamiccruxs.indexOf(crux), 1);
+ }
+ this.generateRegex();
+ },
+ handleInputConfirm() {
+ if (this.whether == 1 && this.inputValue) {
+ if (this.dynamiccruxs.indexOf(this.inputValue) == -1) {
+ this.dynamiccruxs.push(this.inputValue);
+ } else {
+ this.$message.error("鍏抽敭瀛楀凡瀛樺湪");
+ }
+ this.inputVisible = false;
+ } else if (this.whether == 2 && this.inputValue) {
+ console.log(this.inputValue);
+ console.log(this.nodynamiccruxs.indexOf(this.inputValue));
+ if (this.nodynamiccruxs.indexOf(this.inputValue) == -1) {
+ this.nodynamiccruxs.push(this.inputValue);
+ } else {
+ this.$message.error("鍏抽敭瀛楀凡瀛樺湪");
+ }
+ this.noinputVisible = false;
+ }
+ this.generateRegex();
+
+ this.inputValue = "";
+ },
+ showInput() {
+ this.inputVisible = true;
+ this.whether = 1;
+ },
+ showInputno() {
+ this.noinputVisible = true;
+ this.whether = 2;
+ console.log(2);
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.topicxq {
+ background-color: #e2f5fc;
+ border-radius: 4px;
+ margin-top: 10px;
+ padding: 10px;
+}
+
+.el-tag + .el-tag {
+ margin-left: 10px;
+}
+.button-new-tag {
+ margin-left: 10px;
+ height: 32px;
+ line-height: 30px;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.input-new-tag {
+ width: 90px;
+ margin-left: 10px;
+ vertical-align: bottom;
+}
+</style>
diff --git a/src/store/getters.js b/src/store/getters.js
index 7eaf251..848d72a 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -15,6 +15,9 @@
topbarRouters: (state) => state.permission.topbarRouters,
defaultRoutes: (state) => state.permission.defaultRoutes,
sidebarRouters: (state) => state.permission.sidebarRouters,
+ // 姝e垯
+ regular: (state) => state.regular.regular,
+ noregular: (state) => state.regular.noregular,
// 閫傜敤鏂瑰紡
mode: (state) => [
{
@@ -88,11 +91,11 @@
},
},
],
- // 浼樺厛鎵ц
- precedencetype: (state) => [
+ // 鏄惁蹇呭~
+ required: (state) => [
{
value: "0",
- label: "璇煶浼樺厛",
+ label: "蹇呭~",
raw: {
cssClass: "",
listClass: "",
@@ -100,6 +103,25 @@
},
{
value: "1",
+ label: "闈炲繀濉�",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ ],
+ // 浼樺厛鎵ц
+ precedencetype: (state) => [
+ {
+ value: 0,
+ label: "璇煶浼樺厛",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 1,
label: "鏂囧瓧浼樺厛",
raw: {
cssClass: "",
@@ -164,53 +186,97 @@
// 瀹f暀鏂瑰紡
editableTabs: (state) => [
{
- value: "鐭俊",
- label: "1",
+ label: "鐭俊",
+ value: "1",
raw: {
cssClass: "",
listClass: "",
},
},
{
- value: "閽夐拤",
- label: "2",
+ label: "閽夐拤",
+ value: "2",
raw: {
cssClass: "",
listClass: "",
},
},
{
- value: "寰俊",
- label: "3",
+ label: "寰俊",
+ value: "3",
raw: {
cssClass: "",
listClass: "",
},
},
{
- value: "鐢佃瘽",
- label: "4",
+ label: "鐢佃瘽",
+ value: "4",
raw: {
cssClass: "",
listClass: "",
},
},
{
- value: "绾夸笅",
- label: "5",
+ label: "绾夸笅",
+ value: "5",
raw: {
cssClass: "",
listClass: "",
},
},
{
- value: "鏅鸿兘璇煶",
- label: "6",
+ label: "鏅鸿兘璇煶",
+ value: "6",
raw: {
cssClass: "",
listClass: "",
},
},
+ ],
+ // 瀹f暀褰㈠紡
+ editabshape : (state) => [
+ {
+ label: "鏂囨湰",
+ value: "1",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ label: "鍥剧墖",
+ value: "2",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ label: "璇煶",
+ value: "3",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ label: "瑙嗛",
+ value: "4",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ label: "娣峰悎",
+ value: "5",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+
],
// 棰樼洰绫诲埆
xjxsoptions:(state) => [
@@ -232,6 +298,7 @@
},
],
+ // 姝e垯
};
export default getters;
diff --git a/src/store/index.js b/src/store/index.js
index 97aaef8..3f85e32 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -3,6 +3,7 @@
import app from './modules/app'
import dict from './modules/dict'
import user from './modules/user'
+import regular from './modules/regular'
import tagsView from './modules/tagsView'
import permission from './modules/permission'
import settings from './modules/settings'
@@ -15,6 +16,7 @@
app,
dict,
user,
+ regular,
tagsView,
permission,
settings
diff --git a/src/store/modules/regular.js b/src/store/modules/regular.js
new file mode 100644
index 0000000..f14ddac
--- /dev/null
+++ b/src/store/modules/regular.js
@@ -0,0 +1,72 @@
+const user = {
+ state: {
+ regular: [
+ { value: "1", label: "浼�" },
+ { value: "2", label: "缇�" },
+ { value: "3", label: "鍠�" },
+ { value: "4", label: "缇庡ソ" },
+ { value: "5", label: "骞哥" },
+ { value: "6", label: "鐢滅編" },
+ { value: "7", label: "鍙埍" },
+ { value: "8", label: "缇庢弧" },
+ { value: "9", label: "缇庝附" },
+ { value: "10", label: "蹇箰" },
+ { value: "11", label: "骞哥缇庢弧" },
+ { value: "12", label: "缇庡ソ骞哥" },
+ { value: "13", label: "缇庢弧骞哥" },
+ { value: "14", label: "缇庝附骞哥" },
+ { value: "15", label: "缇庡ソ蹇箰" },
+ { value: "16", label: "骞哥蹇箰" },
+ { value: "17", label: "缇庢弧蹇箰" },
+ { value: "18", label: "缇庝附蹇箰" },
+ { value: "19", label: "缇庡ソ鐢滅編" },
+ { value: "20", label: "骞哥鐢滅編" },
+ { value: "21", label: "缇庢弧鐢滅編" },
+ { value: "22", label: "缇庝附鐢滅編" },
+ { value: "23", label: "鍠勮壇缇庡ソ" },
+ { value: "24", label: "浼樼編骞哥" },
+ { value: "25", label: "鍠勮壇骞哥" },
+ { value: "26", label: "浼樼編蹇箰" },
+ { value: "27", label: "鍠勮壇蹇箰" },
+ { value: "28", label: "浼樼編鐢滅編" },
+ { value: "29", label: "鍠勮壇鐢滅編" },
+ { value: "30", label: "缇庡ソ鍙埍" },
+ ],
+ noregular: [
+ { value: "1", label: "鍚�" },
+ { value: "2", label: "鏈�" },
+ { value: "3", label: "闈�" },
+ { value: "4", label: "鏃�" },
+ { value: "5", label: "涓嶆槸" },
+ { value: "6", label: "涓嶅彲" },
+ { value: "7", label: "涓嶈" },
+ { value: "8", label: "涓嶅悎" },
+ { value: "9", label: "涓嶈壇" },
+ { value: "10", label: "涓嶅杽" },
+ { value: "11", label: "涓嶅ソ" },
+ { value: "12", label: "涓嶇編" },
+ { value: "13", label: "涓嶅垢" },
+ { value: "14", label: "涓嶇敎" },
+ { value: "15", label: "涓嶅彲鐖�" },
+ { value: "16", label: "涓嶆弧" },
+ { value: "17", label: "涓嶅揩" },
+ { value: "18", label: "涓嶇敎缇�" },
+ { value: "19", label: "涓嶅杽鑹�" },
+ { value: "20", label: "涓嶄紭缇�" },
+ { value: "21", label: "涓嶇編婊�" },
+ { value: "22", label: "涓嶅垢绂�" },
+ { value: "23", label: "涓嶅彲鐖�" },
+ { value: "24", label: "涓嶇編濂�" },
+ { value: "25", label: "涓嶅彲鍙�" },
+ { value: "26", label: "涓嶅彲淇�" },
+ { value: "27", label: "涓嶅彲琛�" },
+ { value: "28", label: "涓嶅彲闈�" },
+ { value: "29", label: "涓嶅彲鐞�" },
+ { value: "30", label: "涓嶅彲鐢�" },
+ ],
+ },
+ mutations: {},
+ actions: {},
+ getters: {},
+};
+export default user;
diff --git a/src/utils/request.js b/src/utils/request.js
index 878317b..954641e 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -49,7 +49,7 @@
const s_url = sessionObj.url; // 璇锋眰鍦板潃
const s_data = sessionObj.data; // 璇锋眰鏁版嵁
const s_time = sessionObj.time; // 璇锋眰鏃堕棿
- const interval = 50; // 闂撮殧鏃堕棿(ms)锛屽皬浜庢鏃堕棿瑙嗕负閲嶅鎻愪氦
+ const interval = 10; // 闂撮殧鏃堕棿(ms)锛屽皬浜庢鏃堕棿瑙嗕负閲嶅鎻愪氦
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
const message = '鏁版嵁姝e湪澶勭悊锛岃鍕块噸澶嶆彁浜�';
console.warn(`[${s_url}]: ` + message)
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index 8ec30df..fb07522 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -23,7 +23,7 @@
>
<el-form-item label="瀹f暀鍒嗙被" prop="region">
<el-select
- v-model="ruleForm.groupID"
+ v-model="ruleForm.assortid"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
@@ -38,39 +38,48 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="瀹f暀鏍囬" prop="extName">
+ <el-form-item label="瀹f暀鏍囬" prop="preachname">
<div style="width: 30%">
- <el-input v-model="ruleForm.extName"></el-input>
+ <el-input v-model="ruleForm.preachname"></el-input>
</div>
</el-form-item>
- <el-form-item label="瀹f暀鎻忚堪" prop="extName">
+ <el-form-item label="瀹f暀鎻忚堪" prop="preachdescription">
<div style="width: 30%">
- <el-input v-model="ruleForm.note"></el-input>
+ <el-input v-model="ruleForm.preachdescription"></el-input>
</div>
</el-form-item>
<el-form-item label="閫氱煡鍙橀噺" prop="name">
- <el-row v-for="item in variablelist">
- <el-col :span="4">
- <el-input v-model="item.variable"></el-input>
- </el-col>
- <el-col :span="8" :offset="1">
- <el-input v-model="item.value"></el-input>
- </el-col>
- <el-col :span="4" :offset="1">
- <el-button
- type="success"
- icon="el-icon-plus"
- circle
- @click="addvariable(item)"
- ></el-button>
- <el-button
- type="danger"
- icon="el-icon-delete"
- circle
- @click="delvariable(item)"
- ></el-button>
- </el-col>
- </el-row>
+ <div style="margin-bottom: 5px" v-for="item in variablelist">
+ <el-row>
+ <el-col :span="5">
+ <el-input
+ v-model="item.variatename"
+ placeholder="璇疯緭鍏ュ彉閲忓悕"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-input
+ v-model="item.variate"
+ placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-button
+ type="success"
+ icon="el-icon-plus"
+ circle
+ @click="addvariable(item)"
+ ></el-button>
+ <el-button
+ v-if="!item.default"
+ type="danger"
+ icon="el-icon-delete"
+ circle
+ @click="delvariable(item)"
+ ></el-button>
+ </el-col>
+ </el-row>
+ </div>
</el-form-item>
<el-form-item label="鏂囦欢" prop="sickness">
@@ -137,9 +146,8 @@
<el-col :span="9">
<el-form-item label="鍙敤鐘舵��" prop="region">
<el-select
- v-model="ruleForm.isEnable"
+ v-model="ruleForm.isavailable"
size="medium"
- multiple
filterable
placeholder="璇烽�夋嫨鍒嗙被"
>
@@ -156,7 +164,7 @@
</el-row>
<el-form-item label="瀹f暀鏂瑰紡" prop="region">
<el-select
- v-model="ruleForm.way"
+ v-model="ruleForm.suitway"
size="medium"
multiple
filterable
@@ -164,10 +172,10 @@
>
<el-option
class="ruleFormaa"
- v-for="item in xjxsoptions"
- :key="item.value"
+ v-for="item in mode"
+ :key="item.label"
:label="item.label"
- :value="item.value"
+ :value="item.label"
>
</el-option>
</el-select>
@@ -215,7 +223,7 @@
</el-form-item>
<el-form-item label="閫傜敤闄㈠尯" prop="region">
<el-select
- v-model="ruleForm.courtyard"
+ v-model="ruleForm.campus"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
@@ -231,22 +239,18 @@
</el-select>
</el-form-item>
<el-form-item label="閫傜敤绉戝" prop="region">
- <el-select
- v-model="ruleForm.administrative"
- size="medium"
- multiple
- filterable
- placeholder="璇烽�夋嫨鍒嗙被"
+ <el-cascader
+ v-model="tempDetpRelevanceslist"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
>
- <el-option
- class="ruleFormaa"
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item>
<el-button type="success" @click="nextstep('ruleForm')"
@@ -264,10 +268,10 @@
<el-col :span="12">
<div>
<el-button @click="laststep('ruleForm')">涓婁竴姝�</el-button>
- <el-button type="success" @click="submitForm('ruleForm')"
+ <el-button type="success" @click="Departmenttreatment('ruleForm')"
>淇濆瓨</el-button
>
- <el-button type="warning" @click="submitForm('ruleForm')"
+ <el-button type="warning" @click="Departmenttreatment('ruleForm')"
>鍙﹀瓨鏂扮増鏈�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')"
@@ -276,6 +280,19 @@
</div></el-col
>
</el-row>
+ <el-row>
+ <el-col :span="24">
+ <div style="display: flex; margin-left: 66px; margin-bottom: 10px">
+ <div
+ v-for="item in variablelist"
+ class="tsgname"
+ @click="tsgnameto(item)"
+ >
+ {{ item.variatename }}
+ </div>
+ </div>
+ </el-col></el-row
+ >
<div>
<el-form
@@ -342,6 +359,7 @@
illnesslistget,
getillness,
} from "@/api/AiCentre/index";
+import { listDept } from "@/api/system/dept";
// import * as Quill from "quill";
import Quill from "quill";
import { listtag } from "@/api/system/label";
@@ -459,6 +477,9 @@
illnesslist: [],
options: [],
optionstag: [],
+ deptList: [],
+ tempDetpRelevanceslist: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
xjxsoptions: [
{
value: "1",
@@ -483,10 +504,9 @@
addvalue: "娣诲姞棰樼洰",
variablelist: [
- {
- variable: "paitent",
- value: "琛ㄧず鎮h�呯殑鏍囪瘑",
- },
+ { variatename: "濮撳悕", variate: "${name}", default: 1 },
+ { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
],
// 鏌ヨ鍙傛暟
queryParams: {
@@ -519,11 +539,20 @@
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)
+ ? 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() {
@@ -537,18 +566,28 @@
this.optionstag = response.rows;
});
},
- // 瀹屾垚
+
submitForm(formName) {
- this.rules = this.rulesa;
- // 鎻愪氦
- this.$refs[formName].validate((valid) => {
- if (valid) {
- alert("submit!");
- } else {
- console.log("error submit!!");
- return false;
- }
+ let tgs = [];
+ this.dynamicTags.forEach((item) => {
+ tgs.push(item.tagname);
});
+ this.ruleForm.labelInfo = tgs.join(",");
+ this.ruleForm.otherdata = JSON.stringify(this.variablelist);
+ this.ruleForm.suitway = this.ruleForm.suitway.join(",");
+ if (this.id) {
+ this.ruleForm.isoperation = 2;
+ compilelibrary(this.ruleForm).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.$router.go(-1);
+ });
+ } else {
+ this.ruleForm.isoperation = 1;
+ compilelibrary(this.ruleForm).then((response) => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.$router.go(-1);
+ });
+ }
},
// 涓嬩竴姝�
nextstep() {
@@ -577,6 +616,42 @@
});
});
},
+ // 绉戝澶勭悊
+ 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(
+ (obj) => obj.deptId === item
+ );
+ 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);
+ if (!condition) {
+ const index = this.ruleForm.tempDetpRelevances.indexOf(item);
+ this.ruleForm.tempDetpRelevances[index].delFlag = 1;
+ }
+ });
+ console.log(this.ruleForm.tempDetpRelevances);
+ setTimeout(() => {
+ this.submitForm();
+ }, 1000);
+ // this.submitForm();
+ },
// 淇濆瓨棰樼洰淇℃伅
Saveproblem() {},
/** 鏌ヨ棰樼洰鍒楄〃 */
@@ -584,8 +659,8 @@
// 鏂板鍙橀噺
addvariable() {
this.variablelist.push({
- variable: "",
- value: "",
+ variatename: "",
+ variate: "",
});
},
// 鍒犻櫎鍙橀噺
@@ -618,7 +693,7 @@
console.log(this.dynamicTags.indexOf(tag));
const lindex = this.dynamicTags.indexOf(tag);
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
- this.ruleForm.ivrLibaTemplateTargetList[lindex].isoperation = 3;
+ this.ruleForm.heLibraryTagList[lindex].isoperation = 3;
},
handleInputConfirm() {
let tagvalue = {};
@@ -639,7 +714,7 @@
isoperation: 1,
};
}
- this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue);
+ this.ruleForm.heLibraryTagList.push(tagvalue);
this.dynamicTags.push(tagvalue);
});
}
diff --git a/src/views/knowledge/education/index.vue b/src/views/knowledge/education/index.vue
index 013025c..036f7e9 100644
--- a/src/views/knowledge/education/index.vue
+++ b/src/views/knowledge/education/index.vue
@@ -29,7 +29,7 @@
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
- <span>
+ <span v-if="data.id > 0">
<el-button
type="text"
icon="el-icon-delete"
@@ -66,13 +66,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="閫傜敤绉戝" prop="sickness">
+ <el-form-item label="閫傜敤绉戝" prop="region">
<el-cascader
- v-model="queryParams.sickness"
- :options="optionss"
- :props="propss"
+ v-model="queryParams.administrative"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
clearable
- ></el-cascader>
+ >
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf">
+ ({{ data.children.length }})
+ </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item label="閫氱煡鍐呭" prop="userName">
<el-input
@@ -97,10 +105,10 @@
placeholder="璇烽�夋嫨"
>
<el-option
- v-for="(item, index) in editableTabs"
- :key="index++"
- :label="item.title"
- :value="index++"
+ v-for="(item, index) in editabshape"
+ :key="item.label"
+ :label="item.label"
+ :value="item.value"
>
</el-option>
</el-select>
@@ -111,7 +119,7 @@
placeholder="璇烽�夋嫨"
>
<el-option
- v-for="item in qyoptions"
+ v-for="item in usable"
:key="item.value"
:label="item.value"
:value="item.label"
@@ -177,8 +185,8 @@
<el-table-column
label="鏍囬"
align="center"
- key="extName"
- prop="extName"
+ key="preachname"
+ prop="preachname"
:show-overflow-tooltip="true"
/>
<el-table-column
@@ -189,15 +197,15 @@
:show-overflow-tooltip="true"
/>
<el-table-column
- label="涓昏鍐呭(缂�)"
+ label="涓昏鍐呭"
align="center"
- key="userNamevalue"
- prop="userNamevalue"
+ key="preachcontent"
+ prop="preachcontent"
:show-overflow-tooltip="true"
/>
<el-table-column
- label="閫傜敤鐤剧梾(缂�)"
+ label="閫傜敤鐤剧梾"
align="center"
key="aphonenumber"
prop="aphonenumber"
@@ -215,39 +223,48 @@
>
</template>
</el-table-column>
+
<el-table-column
- label="閫傜敤绉戝(缂�)"
+ label="鏍囩"
align="center"
- key="bphonenumber"
- prop="bphonenumber"
- width="120"
- />
- <el-table-column
- label="鏍囩(缂�)"
- align="center"
- key="tagList"
- prop="tagList"
+ key="labelInfo"
+ prop="labelInfo"
width="160"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
- <span v-for="item in scope.row.tagList">{{ item }} </span>
+ <span v-for="item in scope.row.labelInfo.split(',')"
+ >{{ item }}銆�
+ </span>
</template>
</el-table-column>
<el-table-column
- label="瀹f暀鏂瑰紡(缂�)"
+ label="閫傜敤鏂瑰紡"
align="center"
- key="cphonenumber"
- prop="cphonenumber"
+ key="suitway"
+ prop="suitway"
width="120"
- />
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.suitway.split(',')"
+ >{{ item }}銆�
+ </span>
+ </template>
+ </el-table-column>
<el-table-column
- label="璧勬枡褰㈠紡(缂�)"
+ label="鍐呭褰㈠紡"
align="center"
- key="cphonenumbers"
- prop="cphonenumbers"
+ key="preachform"
+ prop="preachform"
width="120"
- />
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="editabshape"
+ :value="scope.row.preachform"
+ />
+ </template>
+ </el-table-column>
<el-table-column
label="鏈�杩戜慨鏀�"
align="center"
@@ -258,10 +275,14 @@
<el-table-column
label="鏄惁鍙敤"
align="center"
- key="isEnable"
- prop="isEnable"
+ key="isavailable"
+ prop="isavailable"
width="120"
- />
+ >
+ <template slot-scope="scope">
+ <dict-tag :options="usable" :value="scope.row.isavailable" />
+ </template>
+ </el-table-column>
<el-table-column
label="鎿嶄綔"
@@ -429,6 +450,7 @@
illnesslistget,
getillness,
} from "@/api/AiCentre/index";
+import { listDept } from "@/api/system/dept";
import { getToken } from "@/utils/auth";
import store from "@/store";
@@ -508,9 +530,12 @@
optionss: [],
mode: [],
languagelist: [],
- qyoptions: [],
+ editabshape: [],
+ usable: [],
precedencetype: [],
xjxsoptions: [],
+ deptList: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
//绫诲埆鍒楄〃
editableTabs: [],
@@ -518,6 +543,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
+ isavailable: "",
},
};
},
@@ -527,8 +553,9 @@
this.getDeptTree();
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
- this.qyoptions = store.getters.usable;
+ this.usable = store.getters.usable;
this.precedencetype = store.getters.precedencetype;
+ this.editabshape = store.getters.editabshape;
},
methods: {
@@ -538,6 +565,9 @@
getlibrarylist(this.queryParams).then((response) => {
console.log(response);
this.userList = response.rows;
+ });
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
});
},
@@ -649,6 +679,7 @@
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
diff --git a/src/views/knowledge/questionbank/index.vue b/src/views/knowledge/questionbank/index.vue
index a2f1567..53644ce 100644
--- a/src/views/knowledge/questionbank/index.vue
+++ b/src/views/knowledge/questionbank/index.vue
@@ -88,8 +88,11 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鏄惁鍙敤" prop="status">
- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨">
+ <el-form-item label="鏄惁鍙敤" prop="isavailable">
+ <el-select
+ v-model="queryParams.isavailable"
+ placeholder="璇烽�夋嫨"
+ >
<el-option
v-for="item in qyoptions"
:key="item.value"
@@ -165,23 +168,27 @@
:show-overflow-tooltip="true"
/>
<el-table-column
- label="棰樼洰鍐呭(缂�)"
+ label="棰樼洰鍐呭"
align="center"
- key="nickName"
- prop="nickName"
+ key="topicContent"
+ prop="topicContent"
width="200"
:show-overflow-tooltip="true"
/>
/><el-table-column
- label="閫傜敤鏂瑰紡(缂�)"
+ label="閫傜敤鏂瑰紡"
align="center"
- key="application"
- prop="application"
+ key="suitway"
+ prop="suitway"
width="120"
- />
+ >
+ <template slot-scope="scope">
+ <dict-tag :options="mode" :value="scope.row.suitway" />
+ </template>
+ </el-table-column>
/><el-table-column
- label="閫傜敤鐤剧梾(缂�)"
+ label="閫傜敤鐤剧梾"
align="center"
key="Applicable"
prop="Applicable"
@@ -200,7 +207,7 @@
</template>
</el-table-column>
<el-table-column
- label="鏍囩(缂�)"
+ label="鏍囩"
align="center"
key="tagList"
prop="tagList"
@@ -208,17 +215,26 @@
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
- <span v-for="item in scope.row.tagList">{{ item }} </span>
+ <span v-for="item in scope.row.tag.split(',')"
+ >{{ item }}銆�
+ </span>
</template>
</el-table-column>
<el-table-column
- label="鍙敤(缂�)"
+ label="鍙敤"
align="center"
- key="usable"
- prop="usable"
+ key="isavailable"
+ prop="isavailable"
width="120"
- />
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="qyoptions"
+ :value="scope.row.isavailable"
+ />
+ </template>
+ </el-table-column>
<el-table-column
label="鏈�杩戜慨鏀�"
align="center"
@@ -291,17 +307,14 @@
<el-option
v-for="item in deptOptions"
:key="item.id"
- :label="item.indexAssortName"
+ :label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="璇疯緭鍏ョ被鍒悕绉�">
- <el-input
- v-model="classifyform.indexAssortName"
- autocomplete="off"
- ></el-input>
+ <el-input v-model="classifyform.name" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -411,6 +424,7 @@
// 琛ㄦ牸鏁版嵁
userList: [],
// 寮瑰嚭灞傛爣棰�
+ tag: "",
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
@@ -440,7 +454,7 @@
illnesslist: [],
defaultProps: {
children: "svyLibTopicCategoryList",
- label: "indexAssortName",
+ label: "name",
},
mode: [],
languagelist: [],
@@ -449,6 +463,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
+ isavailable: "",
},
// 琛ㄥ崟鏍¢獙
rules: {},
@@ -457,6 +472,7 @@
watch: {},
created() {
this.getList();
+ this.getDeptTree();
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
this.qyoptions = store.getters.usable;
@@ -573,29 +589,31 @@
let calssvalue = {};
if (
this.classifyform.pid &&
- this.classifyform.indexAssortName &&
+ this.classifyform.name &&
this.radio == "瀛愬垎绫�"
) {
const index = this.deptOptions.findIndex(
(obj) => obj.id == this.classifyform.pid
);
calssvalue = this.deptOptions[index];
- calssvalue.ivrLibaTemplateAssortList.push(this.classifyform);
- } else if (this.radio == "涓诲垎绫�" && this.classifyform.indexAssortName) {
+ calssvalue.svyLibTopicCategoryList.push(this.classifyform);
+ } else if (this.radio == "涓诲垎绫�" && this.classifyform.name) {
this.classifyform.pid = null;
- this.classifyform.ivrLibaTemplateAssortList = [];
+ this.classifyform.svyLibTopicCategoryList = [];
} else {
return this.$modal.msgError("璇峰~鍐欏畬鏁翠俊鎭�");
}
addissueclassify(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
if (b.pid) {
this.$modal
- .confirm('鏄惁纭鍒犻櫎鍒嗙被椤逛负"' + b.indexAssortName + '"鐨勬暟鎹」锛�')
+ .confirm('鏄惁纭鍒犻櫎鍒嗙被椤逛负"' + b.name + '"鐨勬暟鎹」锛�')
.then(function () {
return delissueclassify(b.id);
})
@@ -607,9 +625,7 @@
} else {
this.$modal
.confirm(
- '鏄惁纭鍒犻櫎涓�绾у垎绫�"' +
- b.indexAssortName +
- '"锛熷垹闄ゅ悗鍏朵笅鍒嗙被灏嗗綊绫烩�樻湭鍒嗙被鈥�'
+ '鏄惁纭鍒犻櫎涓�绾у垎绫�"' + b.name + '"锛熷垹闄ゅ悗鍏朵笅鍒嗙被灏嗗綊绫烩�樻湭鍒嗙被鈥�'
)
.then(() => {
return delissueclassify(b.id);
@@ -625,7 +641,7 @@
// 绛涢�夎妭鐐�
filterNode(value, data) {
if (!value) return true;
- return data.indexAssortName.indexOf(value) !== -1;
+ return data.name.indexOf(value) !== -1;
},
handleNodeClick(data) {
this.queryParams.assortid = data.id;
diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index e05bd41..ef1020e 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -6,7 +6,7 @@
<div class="headline">
棰樼洰璁剧疆璇︽儏
<span style="margin-left: 30px"
- ><el-button type="primary" @click="Submittopicobj"
+ ><el-button type="primary" @click="compileissue"
>淇濆瓨</el-button
></span
>
@@ -23,7 +23,7 @@
<el-col :span="6"
><el-form-item label="鏄惁鍙敤">
<el-select
- v-model="topicobj.ishide"
+ v-model="topicobj.isavailable"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
@@ -41,7 +41,7 @@
<el-col :span="8"
><el-form-item label="璇█(缂�)">
<el-select
- v-model="topicobj.languageh"
+ v-model="topicobj.language"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
@@ -59,13 +59,23 @@
</el-row>
<el-row :gutter="10">
<el-col :span="6"
- ><el-form-item label="鏄惁蹇呯瓟">
- <el-radio-group v-model="topicobj.ismandatory">
- <el-radio label="1">鏄�</el-radio>
- <el-radio label="2">鍚�</el-radio>
- </el-radio-group>
- </el-form-item></el-col
- >
+ ><el-form-item label="鏄惁蹇呭~">
+ <el-select
+ v-model="topicobj.ismandatory"
+ size="medium"
+ filterable
+ placeholder="璇烽�夋嫨鍒嗙被"
+ >
+ <el-option
+ class="topicobjaa"
+ v-for="item in required"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select> </el-form-item
+ ></el-col>
<el-col :span="6"
><el-form-item label="棰樼洰绫诲瀷">
<el-select
@@ -85,9 +95,9 @@
</el-select> </el-form-item
></el-col>
<el-col :span="8"
- ><el-form-item label="閫傜敤鏂瑰紡(缂�)">
+ ><el-form-item label="閫傜敤鏂瑰紡">
<el-select
- v-model="topicobj.languageh"
+ v-model="topicobj.suitway"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
@@ -102,11 +112,13 @@
</el-option> </el-select></el-form-item
></el-col>
</el-row>
- <el-form-item label="棰樼洰鍐呭(缂�)">
+ <el-form-item label="棰樼洰鍐呭">
<el-input
style="width: 40vw"
type="textarea"
- v-model="topicobj.topic"
+ id="questiontext"
+ v-model="topicobj.topicContent"
+ @focus="handleInput('questiontext')"
placeholder="璇疯緭鍏ユ爣棰�"
></el-input>
</el-form-item>
@@ -115,14 +127,14 @@
<el-form-item label="鏍囩" prop="desc">
<div class="xinz-inf">
<el-tag
- :key="tag.tagname"
+ :key="tag"
type="success"
v-for="tag in dynamicTags"
closable
:disable-transitions="false"
@close="handleClosetag(tag)"
>
- {{ tag.tagname }}
+ {{ tag }}
</el-tag>
<el-select
v-model="inputValue"
@@ -197,6 +209,54 @@
</div>
</el-form-item>
</el-row>
+ <el-form-item label="閫氱煡鍙橀噺" prop="name">
+ <div style="margin-bottom: 5px" v-for="item in variablelist">
+ <el-row>
+ <el-col :span="5">
+ <el-input
+ v-model="item.variatename"
+ placeholder="璇疯緭鍏ュ彉閲忓悕"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-input
+ v-model="item.variate"
+ placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-button
+ type="success"
+ icon="el-icon-plus"
+ circle
+ @click="addvariable(item)"
+ ></el-button>
+ <el-button
+ v-if="!item.default"
+ type="danger"
+ icon="el-icon-delete"
+ circle
+ @click="delvariable(item)"
+ ></el-button>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form-item>
+ <el-row>
+ <el-col :span="24">
+ <div
+ style="display: flex; margin-left: 66px; margin-bottom: 10px"
+ >
+ <div
+ v-for="item in variablelist"
+ class="tsgname"
+ @click="tsgnameto(item)"
+ >
+ {{ item.variatename }}
+ </div>
+ </div>
+ </el-col></el-row
+ >
</div>
<div class="headline">
@@ -210,14 +270,18 @@
></span
>
</div>
- <div class="topicxq" v-for="item in optionlist">
+ <div
+ class="topicxq"
+ v-for="item in topicobj.svyLibTopicoptions"
+ v-if="item.isoperation != 3"
+ >
<el-row :gutter="10">
<el-col :span="11"
- ><el-form-item label="棰樺彿">
+ ><el-form-item label="閫夐」">
<el-input
type="text"
- placeholder="璇疯緭鍏�"
- v-model="item.optionid"
+ placeholder="璇疯緭鍏ラ�夐」"
+ v-model="item.optioncontent"
show-word-limit
>
</el-input> </el-form-item
@@ -232,28 +296,6 @@
>
</el-input> </el-form-item
></el-col>
- </el-row>
- <el-row :gutter="10">
- <el-col :span="11"
- ><el-form-item label="閫夐」">
- <el-input
- type="text"
- placeholder="璇疯緭鍏ラ�夐」"
- v-model="item.optioncontent"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- <el-col :span="11"
- ><el-form-item label="涓嬮璺宠浆">
- <el-input
- type="text"
- placeholder="璇疯緭鍏ラ鍙�"
- v-model="item.jump"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
<el-col :span="2">
<el-button
type="danger"
@@ -263,6 +305,7 @@
></el-button>
</el-col>
</el-row>
+
<el-row :gutter="10">
<el-form-item label="閫変腑鎻愮ず">
<el-input
@@ -295,37 +338,20 @@
>
<el-form-item label="鏍囬" prop="userName">
<el-input
- v-model="queryParams.userName"
+ v-model="queryParams.targetname"
placeholder="璇疯緭鍏�"
clearable
style="width: 200px"
- @keyup.enter.native="handleQuery"
+ @keyup.enter.native="gettargetInfo"
/>
</el-form-item>
- <el-form-item label="涓婚" prop="sickness">
- <el-select
- v-model="queryParams.classify"
- size="medium"
- multiple
- filterable
- placeholder="璇烽�夋嫨鍒嗙被"
- >
- <el-option
- class="ruleFormaa"
- v-for="item in optionsclass"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
+
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="medium"
- @click="handleQuery"
+ @click="gettargetInfo"
>鎼滅储</el-button
>
<el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
@@ -333,19 +359,19 @@
>
</el-form-item>
</el-form>
- <el-table v-loading="loading" :data="userList">
+ <el-table v-loading="loading" :data="targetList">
<el-table-column
label="鏍囬"
align="center"
- key="userid"
- prop="userid"
+ key="targetname"
+ prop="targetname"
width="100"
/>
<el-table-column
label="闂鍐呭"
align="center"
- key="userName"
- prop="userName"
+ key="targetdesc"
+ prop="targetdesc"
width="200"
:show-overflow-tooltip="true"
/>
@@ -367,6 +393,13 @@
</template>
</el-table-column>
</el-table>
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="gettargetInfo"
+ />
</div>
</el-drawer>
</div>
@@ -376,9 +409,7 @@
import { listtag } from "@/api/system/label";
import store from "@/store";
import {
- getissueclassify,
- delissueclassify,
- addissueclassify,
+ gettargetInfo,
getissuelist,
issueinfo,
compileissue,
@@ -394,27 +425,29 @@
export default {
data() {
return {
- topicobj: {},
+ topicobj: {
+ svyLibTopicoptions: [],
+ },
inputVisible: false,
inputValue: "",
+ currentInputId: "",
+ total: 0,
drawer: false,
loading: false,
id: [],
- userList: [
- {
- userid: "1",
- userName: "鎸囨爣",
- },
- {
- userid: "2",
- userName: "浜屽彿闂嵎",
- },
- ],
+ targetList: [],
dynamicTags: [],
+ optionsclass: [],
+ variablelist: [
+ { variatename: "濮撳悕", variate: "${name}", default: 1 },
+ { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
+ ],
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
+ isavailable: "",
},
optionlist: [
{ value: "topic", table: "topic" },
@@ -422,6 +455,7 @@
{ value: "topic", table: "topic" },
],
inputValueillness: "",
+ required: [],
themelist: [],
languagelist: [],
courtyardlist: [],
@@ -444,14 +478,15 @@
created() {
this.gettabList();
this.getissueinfo();
+ this.gettargetInfo();
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
this.usable = store.getters.usable;
this.xjxsoptions = store.getters.xjxsoptions;
+ this.required = store.getters.required;
},
methods: {
- Submittopicobj() {},
getIndexInArray(arr, obj) {
return arr.indexOf(obj);
},
@@ -459,8 +494,15 @@
// 鑾峰彇鏁版嵁
getissueinfo() {
this.id = this.$route.query.id;
- issueinfo(this.id).then((res) => {
- this.topicobj = res.data;
+ if (!this.id) {
+ return;
+ }
+ getissuelist({ topicid: this.id }).then((res) => {
+ this.topicobj = res.rows[0];
+ this.dynamicTags = this.topicobj.tag.split(",");
+ this.variablelist = JSON.parse(this.topicobj.otherdata)
+ ? JSON.parse(this.topicobj.otherdata)
+ : this.variablelist;
});
getillnesslist({
pageNum: 1,
@@ -472,12 +514,28 @@
this.illnesslist = res.rows;
});
},
+ gettargetInfo() {
+ gettargetInfo(this.queryParams).then((res) => {
+ this.targetList = res.rows;
+ this.total = res.total;
+ });
+ },
// 鏂板鎴栦慨鏀硅鎯�
compileissue() {
+ this.topicobj.svyLibTopicoptions = this.topicobj.svyLibTopicoptions.map(
+ (item) => {
+ if (item.isoperation != 1 && item.isoperation != 3) {
+ item.isoperation = 2;
+ }
+ return item;
+ }
+ );
+ this.topicobj.otherdata = JSON.stringify(this.variablelist);
+ this.topicobj.tag = this.dynamicTags.join(",");
if (this.id) {
- this.topicobj.isoperation = 1;
+ this.topicobj.isoperation = 2;
compileissue(this.topicobj).then((res) => {
- if (res.code == 1) {
+ if (res.code == 200) {
this.$message({
message: "淇敼鎴愬姛",
type: "success",
@@ -491,9 +549,9 @@
}
});
} else {
- this.topicobj.isoperation = 2;
+ this.topicobj.isoperation = 1;
compileissue(this.topicobj).then((res) => {
- if (res.code == 1) {
+ if (res.code == 200) {
this.$message({
message: "鏂板鎴愬姛",
type: "success",
@@ -507,18 +565,41 @@
}
});
}
+ this.illnesslist.forEach((item, index) => {
+ if (!item.id) {
+ addtargetillness(item).then((res) => {});
+ }
+ });
+ if (this.illnesslistapi.length) {
+ deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
+ }
},
// 鍒犻櫎閫夐」
deletexuanx(row) {
- const index = this.getIndexInArray(this.optionlist, row);
- this.optionlist.splice(index, 1);
+ const index = this.getIndexInArray(this.topicobj.svyLibTopicoptions, row);
+ if (this.topicobj.svyLibTopicoptions[index].topicid) {
+ this.topicobj.svyLibTopicoptions[index].isoperation = 3;
+ } else {
+ this.topicobj.svyLibTopicoptions.splice(index, 1);
+ }
},
// 鏂板閫夐」
addoption() {
- this.optionlist.push({ value: "topic", table: "topic" });
+ this.topicobj.svyLibTopicoptions.push({
+ score: "",
+ isoperation: 1,
+ });
},
// 閫夋嫨鎸囨爣
- selectlabel(row) {},
+ selectlabel(row) {
+ const labellist = row.targetoptionList;
+ labellist.forEach((item) => {
+ this.topicobj.svyLibTopicoptions.push({
+ optioncontent: item.targetvalue,
+ isoperation: 1,
+ });
+ });
+ },
// 鏍囩-----------------
gettabList() {
@@ -535,9 +616,7 @@
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.ivrLibaTemplateTargetList[lindex].isoperation = 3;
},
handleInputConfirm() {
let tagvalue = {};
@@ -558,8 +637,8 @@
isoperation: 1,
};
}
- // this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue);
- this.dynamicTags.push(tagvalue);
+ // this.dynamicTags.push(tagvalue);
+ this.dynamicTags.push(tagvalue.tagname);
});
}
this.inputVisible = false;
@@ -635,9 +714,71 @@
this.illnessVisible = false;
this.$modal.msgSuccess("缂栬緫鎴愬姛");
},
- // 鏌ヨ棰樺簱
- handleQuery() {},
resetQuery() {},
+ // 渚挎嵎鏍囩
+ tsgnameto(row) {
+ let inputValueArr = "";
+ let el = document.querySelector("#" + this.currentInputId);
+ //el.selectionStart; 杩欏氨鏄綋鍓嶅厜鏍囨墍鍦ㄧ殑浣嶇疆锛堝瓧绗︿覆涓瓧绗︾殑index锛�
+ if (this.currentInputId == "questiontext") {
+ inputValueArr = this.indexform.questiontext.split("");
+ } else if (this.currentInputId == "nomatchtext") {
+ inputValueArr = this.indexform.nomatchtext.split("");
+ } else if (this.currentInputId == "sliencetext") {
+ inputValueArr = this.indexform.sliencetext.split("");
+ } else if (this.currentInputId == "noclearlytext") {
+ inputValueArr = this.indexform.noclearlytext.split("");
+ } else if (this.currentInputId == "submoduletext") {
+ inputValueArr = this.indexform.submoduletext.split("");
+ } else {
+ return;
+ }
+ //灏嗚緭鍏ユ鍐呭鍒囨垚鏁扮粍锛屾柟渚垮悗缁搷浣�
+ // inputValueArr = this.inputValue.split("");
+ // 鎷垮埌閫変腑鏂囧瓧鐨勯暱搴︼紙鍚庣画鍙互鐢ㄦ潵鏇挎崲閫変腑鐨勬枃瀛楋級
+ let selectLength = el.selectionEnd - el.selectionStart;
+ // 灏嗚鎻掑叆/鏇挎崲鐨勬枃瀛楁彃鍏�/鏇挎崲锛坴alue.name鏄鎻掑叆/鏇挎崲鐨勫瓧绗︿覆锛�
+ inputValueArr.splice(el.selectionStart, selectLength, `${row.variate}`);
+ // 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪��
+ inputValueArr = inputValueArr.join("");
+ console.log(inputValueArr);
+ if (this.currentInputId == "questiontext") {
+ this.indexform.questiontext = inputValueArr;
+ } else if (this.currentInputId == "nomatchtext") {
+ this.indexform.nomatchtext = inputValueArr;
+ } else if (this.currentInputId == "sliencetext") {
+ this.indexform.sliencetext = inputValueArr;
+ } else if (this.currentInputId == "noclearlytext") {
+ this.indexform.noclearlytext = inputValueArr;
+ } else if (this.currentInputId == "submoduletext") {
+ this.indexform.submoduletext = inputValueArr;
+ } else {
+ return;
+ }
+ },
+
+ // 鏂板鍙橀噺
+ addvariable() {
+ this.variablelist.push({
+ variatename: "",
+ variate: "",
+ });
+ },
+ // 鍒犻櫎鍙橀噺
+ delvariable(item) {
+ const index = this.variablelist.indexOf(item);
+ if (index !== -1) {
+ this.variablelist.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱�
+ } else {
+ console.log("鏈壘鍒拌瀵硅薄");
+ }
+ },
+ // 杈撳叆鑾峰彇id
+ handleInput(id) {
+ this.currentInputId = id;
+ console.log("杈撳叆妗嗙殑鍊煎凡鏇存柊:", this.currentInputId);
+ // 鍦ㄨ繖閲屾墽琛屾洿鏂版暟鎹殑閫昏緫
+ },
},
};
</script>
@@ -691,6 +832,21 @@
}
}
}
+.tsgname {
+ width: 90px;
+ margin-right: 10px;
+ text-align: center;
+ cursor: pointer;
+ height: 40px;
+ line-height: 40px;
+ background: #7799fa;
+ color: #ffff;
+ font-size: 18px;
+ border-radius: 5px;
+}
+.tsgname:hover {
+ background: #3366f5;
+}
.preview-left {
margin: 20px;
// margin: 20px;
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index 26c78ac..d01a149 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -30,16 +30,15 @@
<el-select
v-model="ruleForm.categoryid"
size="medium"
- multiple
filterable
placeholder="璇烽�夋嫨鍒嗙被"
>
<el-option
class="ruleFormaa"
v-for="item in optionsclass"
- :key="item.value"
- :label="item.label"
- :value="item.value"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id"
>
</el-option>
</el-select>
@@ -59,37 +58,6 @@
>
</el-input
></el-form-item>
- <el-form-item label="閫氱煡鍙橀噺" prop="name">
- <el-row v-for="item in variablelist">
- <el-col :span="4">
- <el-input
- v-model="item.name"
- placeholder="璇疯緭鍏ュ彉閲忓悕"
- ></el-input>
- </el-col>
- <el-col :span="8" :offset="1">
- <el-input
- v-model="item.value"
- placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
- ></el-input>
- </el-col>
- <el-col :span="4" :offset="1">
- <el-button
- type="success"
- icon="el-icon-plus"
- circle
- @click="addvariable(item)"
- ></el-button>
- <el-button
- v-if="item"
- type="danger"
- icon="el-icon-delete"
- circle
- @click="delvariable(item)"
- ></el-button>
- </el-col>
- </el-row>
- </el-form-item>
<el-form-item label="鏂囦欢" prop="sickness">
<div style="width: 40%">
@@ -110,14 +78,14 @@
<el-form-item label="鏍囩" prop="desc">
<div class="xinz-inf">
<el-tag
- :key="tag.tagname"
+ :key="tag"
type="success"
v-for="tag in dynamicTags"
closable
:disable-transitions="false"
@close="handleClosetag(tag)"
>
- {{ tag.tagname }}
+ {{ tag }}
</el-tag>
<el-select
v-model="inputValue"
@@ -202,7 +170,6 @@
<el-select
v-model="ruleForm.isenable"
size="medium"
- multiple
filterable
placeholder="璇烽�夋嫨鍒嗙被"
>
@@ -217,9 +184,9 @@
</el-select> </el-form-item
></el-col>
</el-row>
- <el-form-item label="闂嵎鏂瑰紡(缂�)" prop="region">
+ <el-form-item label="闂嵎鏂瑰紡" prop="region">
<el-select
- v-model="ruleForm.way"
+ v-model="ruleForm.suitway"
size="medium"
multiple
filterable
@@ -227,7 +194,7 @@
>
<el-option
class="ruleFormaa"
- v-for="item in xjxsoptions"
+ v-for="item in mode"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -238,7 +205,7 @@
<el-form-item label="閫傜敤闄㈠尯" prop="region">
<el-select
- v-model="ruleForm.courtyard"
+ v-model="ruleForm.campus"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
@@ -246,37 +213,33 @@
<el-option
class="ruleFormaa"
v-for="item in courtyardlist"
- :key="item.value"
+ :key="item.label"
:label="item.label"
- :value="item.value"
+ :value="item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="閫傜敤绉戝" prop="region">
- <el-select
- v-model="ruleForm.administrative"
- size="medium"
- multiple
- filterable
- placeholder="璇烽�夋嫨鍒嗙被"
+ <el-cascader
+ v-model="tempDetpRelevanceslist"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
>
- <el-option
- class="ruleFormaa"
- v-for="item in courtyardlist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item>
<el-button type="success" @click="nextstep('ruleForm')"
>涓嬩竴姝�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="submitForm('ruleForm')"
+ <el-button @click="Departmenttreatment('ruleForm')"
>淇濆瓨闂嵎鍩虹淇℃伅</el-button
>
</el-form-item>
@@ -291,32 +254,32 @@
type="primary"
icon="el-icon-plus"
round
- @click="drawer = true"
+ @click="getaddtopiclist"
>娣诲姞棰樼洰</el-button
>
</div>
<div class="presentation">
<div class="presentation-left">
<el-card class="box-card" style="min-height: 688px">
- <el-table v-loading="loading" :data="userList">
+ <el-table v-loading="loading" :data="ruleForm.svyLibTopics">
<el-table-column
label="搴忓彿"
align="center"
- key="userid"
- prop="userid"
+ key="topicid"
+ prop="topicid"
/>
<el-table-column
label="棰樼洰"
align="center"
- key="userName"
- prop="userName"
+ key="topic"
+ prop="topic"
:show-overflow-tooltip="true"
/>
<el-table-column
label="涓昏鍐呭"
align="center"
- key="maincontent"
- prop="maincontent"
+ key="topicContent"
+ prop="topicContent"
:show-overflow-tooltip="true"
/>
@@ -344,14 +307,6 @@
</el-table-column>
</el-table>
</el-card>
-
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
</div>
<div class="presentation-right">
<el-card class="box-card">
@@ -370,35 +325,54 @@
</div>
<el-form-item label="棰樼洰鏍囬">
<el-input
- v-model="topicobj.title"
+ v-model="topicobj.topic"
placeholder="璇疯緭鍏ユ爣棰�"
></el-input>
</el-form-item>
<el-row :gutter="10">
<el-col :span="12"
- ><el-form-item label="鏄惁蹇呯瓟">
- <el-radio-group v-model="topicobj.resource">
- <el-radio label="鏄�"></el-radio>
- <el-radio label="鍚�"></el-radio>
- </el-radio-group> </el-form-item
+ ><el-form-item label="鏄惁蹇呭~">
+ <el-select
+ v-model="topicobj.ismandatory"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in required"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select> </el-form-item
></el-col>
<el-col :span="12"
- ><el-form-item label="鏄惁闅愯棌">
- <el-radio-group v-model="topicobj.resourcea">
- <el-radio label="鏄�"></el-radio>
- <el-radio label="鍚�"></el-radio>
- </el-radio-group> </el-form-item
+ ><el-form-item label="鏄惁鍙敤">
+ <el-select
+ v-model="topicobj.isavailable"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in usable"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select> </el-form-item
></el-col>
</el-row>
<div class="headline">閫夐」璁剧疆</div>
- <div class="topicxq" v-for="item in optionlist">
+ <div
+ class="topicxq"
+ v-for="item in topicobj.svyLibTopicoptions"
+ >
<el-row :gutter="10">
<el-col :span="11"
><el-form-item label="棰樺彿">
<el-input
type="text"
placeholder="璇疯緭鍏�"
- v-model="item.optionid"
+ v-model="item.topicid"
show-word-limit
>
</el-input> </el-form-item
@@ -467,7 +441,7 @@
>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Saveproblem('ruleForm')">淇濆瓨棰樼洰鏁版嵁</el-button>
+ <el-button @click="submitForm('ruleForm')">淇濆瓨棰樼洰鏁版嵁</el-button>
</div>
<!-- 闂嵎棰勮 -->
<div v-if="Editprogress == 3">
@@ -544,24 +518,16 @@
placeholder="璇疯緭鍏�"
clearable
style="width: 200px"
- @keyup.enter.native="handleQuery"
+ @keyup.enter.native="getaddtopiclist"
/>
</el-form-item>
- <el-form-item label="涓婚" prop="sickness">
- <el-input
- v-model="queryParams.userName"
- placeholder="璇疯緭鍏�"
- clearable
- style="width: 200px"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
+
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="medium"
- @click="handleQuery"
+ @click="getaddtopiclist"
>鎼滅储</el-button
>
<el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
@@ -573,15 +539,15 @@
<el-table-column
label="鏍囬"
align="center"
- key="userid"
- prop="userid"
+ key="topic"
+ prop="topic"
width="100"
/>
<el-table-column
label="闂鍐呭"
align="center"
- key="userName"
- prop="userName"
+ key="topicContent"
+ prop="topicContent"
width="200"
:show-overflow-tooltip="true"
/>
@@ -592,10 +558,7 @@
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="handleUpdate(scope.row)"
+ <el-button size="medium" type="text" @click="addtopic(scope.row)"
><span class="button-textxg"
><i class="el-icon-circle-plus-outline"></i>娣诲姞</span
></el-button
@@ -610,16 +573,19 @@
<script>
import { listtag } from "@/api/system/label";
+import { listDept } from "@/api/system/dept";
import store from "@/store";
import {
getQtemplateclassify,
delQtemplateclassify,
addQtemplateclassify,
getQtemplatelist,
+ compileQtemplate,
Qtemplateinfo,
compileissue,
delQtemplateinfo,
Followupinfo,
+ getissuelist,
deltargetillness,
addtargetillness,
getillnesslist,
@@ -652,20 +618,7 @@
{ value: "topic", table: "topic" },
{ value: "topic", table: "topic" },
],
- xjxsoptions: [
- {
- value: "閫夐」1",
- label: "鍥炬枃",
- },
- {
- value: "閫夐」2",
- label: "瑙嗛",
- },
- {
- value: "閫夐」3",
- label: "闊抽",
- },
- ],
+
fileList: [
{
name: "food.jpeg",
@@ -676,16 +629,7 @@
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
},
],
- options: [
- {
- value: "閫夐」1",
- label: "鐤剧梾闂嵎",
- },
- {
- value: "閫夐」2",
- label: "鍏ラ櫌闂嵎",
- },
- ],
+
variablelist: [
{
variable: "paitent",
@@ -702,16 +646,9 @@
],
addvalue: "娣诲姞棰樼洰",
// 棰樼洰琛ㄦ牸鏁版嵁
- userList: [
- {
- userid: "1",
- userName: "涓�鍙烽棶鍗�",
- },
- {
- userid: "2",
- userName: "浜屽彿闂嵎",
- },
- ],
+ userList: [],
+ deptList: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
themelist: [],
languagelist: [],
courtyardlist: [],
@@ -724,20 +661,16 @@
optionsillness: [],
illnesslistapi: [],
illnesslist: [],
-
+ tempDetpRelevanceslist: [],
optionstag: [],
xjxsoptions: [],
usable: [],
+ required: [],
mode: [], //鏂瑰紡
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
- userName: undefined,
- phonenumber: undefined,
- status: undefined,
- deptId: undefined,
- IDnumber: undefined,
},
};
},
@@ -748,6 +681,7 @@
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
this.usable = store.getters.usable;
+ this.required = store.getters.required;
this.xjxsoptions = store.getters.xjxsoptions;
this.courtyardlist = store.getters.courtyardlist;
},
@@ -759,8 +693,12 @@
// 鑾峰彇鏁版嵁
getissueinfo() {
this.id = this.$route.query.id;
- Qtemplateinfo(this.id).then((res) => {
- this.ruleForm = res.data;
+ getQtemplatelist({ svyid: this.id }).then((res) => {
+ this.ruleForm = res.rows[0];
+ this.dynamicTags = this.ruleForm.labelInfo.split(",");
+ this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
+ this.ruleForm.suitway = this.ruleForm.suitway.split(",");
+ console.log(this.tempDetpRelevanceslist);
});
getillnesslist({
pageNum: 1,
@@ -771,8 +709,67 @@
getillness({ outid: this.id, type: 5 }).then((res) => {
this.illnesslist = res.rows;
});
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
+ });
+ getQtemplateclassify({}).then((res) => {
+ this.optionsclass = res.rows;
+ });
},
- submitForm(formName) {},
+ submitForm(formName) {
+ this.ruleForm.labelInfo = this.dynamicTags.join(",");
+ this.ruleForm.suitway = this.ruleForm.suitway.join(",");
+
+ if (this.id) {
+ this.ruleForm.isoperation = 2;
+ compileQtemplate(this.ruleForm).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.$router.go(-1);
+ });
+ } else {
+ this.ruleForm.isoperation = 1;
+ compileQtemplate(this.ruleForm).then((response) => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.$router.go(-1);
+ });
+ }
+ },
+ // 绉戝澶勭悊
+ 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(
+ (obj) => obj.deptId === item
+ );
+ 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);
+ if (!condition) {
+ const index = this.ruleForm.tempDetpRelevances.indexOf(item);
+ this.ruleForm.tempDetpRelevances[index].delFlag = 1;
+ }
+ });
+ console.log(this.ruleForm.tempDetpRelevances);
+ setTimeout(() => {
+ this.submitForm();
+ }, 1000);
+ // this.submitForm();
+ },
// 涓嬩竴姝�
nextstep() {
if (this.Editprogress <= 2) {
@@ -800,22 +797,32 @@
});
});
},
- // 淇濆瓨棰樼洰淇℃伅
- Saveproblem() {},
- /** 鏌ヨ棰樼洰鍒楄〃 */
- getList() {
- // this.loading = true;
- listUser().then((response) => {
- console.log(response);
- // this.userList = response.data;
- // this.total = response.total;
- // this.loading = false;
+ // 鑾峰彇棰樼洰鍒楄〃
+ getaddtopiclist() {
+ this.drawer = true;
+ getissuelist(this.queryParams).then((res) => {
+ this.loading = false;
+ this.userList = res.rows;
+ this.total = res.total;
console.log(this.userList);
});
- // const { rows } = await listUser();
- // console.log(rows);
- // this.list = rows;
},
+ // 鏂板棰樼洰
+ addtopic(row) {
+ row.isoperation = 1;
+ this.ruleForm.svyLibTopics.push(row);
+ },
+ handleDelete(row) {
+ this.ruleForm.svyLibTopics.splice(
+ this.ruleForm.svyLibTopics.indexOf(row),
+ 1
+ );
+ },
+ handleUpdate(row) {
+ console.log(row);
+ this.topicobj = row;
+ },
+
// 淇敼棰樼洰淇℃伅
Submittopicobj() {},
// 鏂板鍙橀噺
@@ -853,9 +860,8 @@
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.ivrLibaTemplateTargetList[lindex].isoperation = 3;
+ // this.ruleForm.ivrLibaTemplateTargetList[lindex].isoperation = 3;
},
handleInputConfirm() {
let tagvalue = {};
@@ -877,7 +883,8 @@
};
}
// this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue);
- this.dynamicTags.push(tagvalue);
+ // this.dynamicTags.push(tagvalue);
+ this.dynamicTags.push(tagvalue.tagname);
});
}
this.inputVisible = false;
@@ -954,9 +961,10 @@
this.$modal.msgSuccess("缂栬緫鎴愬姛");
},
// --------------------------
- // 鏌ヨ棰樺簱
- handleQuery() {},
- resetQuery() {},
+ resetQuery() {
+ this.queryParams = { pageNum: 1, pageSize: 10 };
+ this.getaddtopiclist();
+ },
resetForm(formName) {
this.$refs[formName].resetFields();
},
diff --git a/src/views/knowledge/questionnaire/index.vue b/src/views/knowledge/questionnaire/index.vue
index e4c3562..d6c4277 100644
--- a/src/views/knowledge/questionnaire/index.vue
+++ b/src/views/knowledge/questionnaire/index.vue
@@ -29,7 +29,7 @@
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
- <span>
+ <span v-if="node.id > 0">
<el-button
type="text"
icon="el-icon-delete"
@@ -66,13 +66,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="閫傜敤绉戝" prop="sickness">
+ <el-form-item label="閫傜敤绉戝" prop="region">
<el-cascader
- v-model="queryParams.sickness"
- :options="editableTabs"
- :props="propss"
+ v-model="queryParams.administrative"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
clearable
- ></el-cascader>
+ >
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf">
+ ({{ data.children.length }})
+ </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item label="閫氱煡鍐呭" prop="userName">
<el-input
@@ -199,7 +207,7 @@
prop="description"
width="260"
/><el-table-column
- label="閫傜敤鐤剧梾(缂�)"
+ label="閫傜敤鐤剧梾"
align="center"
key="Applicable"
prop="Applicable"
@@ -216,33 +224,22 @@
>
</template>
</el-table-column>
+
<el-table-column
- label="閫傜敤绉戝(缂�)"
+ label="鏍囩"
align="center"
- key="administrative"
- prop="administrative"
- width="120"
- />
- <el-table-column
- label="鏍囩(缂�)"
- align="center"
- key="tagList"
- prop="tagList"
+ key="labelInfo"
+ prop="labelInfo"
width="160"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
- <span v-for="item in scope.row.tagList">{{ item }} </span>
+ <span v-for="item in scope.row.labelInfo.split(',')"
+ >{{ item }}銆�
+ </span>
</template>
</el-table-column>
- <el-table-column
- label="璧勬枡褰㈠紡(缂�)"
- align="center"
- key="cphonenumaber"
- prop="cphonenumaber"
- width="120"
- />
<el-table-column
label="鍙敤"
align="center"
@@ -336,17 +333,14 @@
<el-option
v-for="item in deptOptions"
:key="item.id"
- :label="item.indexAssortName"
+ :label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="璇疯緭鍏ョ被鍒悕绉�">
- <el-input
- v-model="classifyform.indexAssortName"
- autocomplete="off"
- ></el-input>
+ <el-input v-model="classifyform.name" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -432,6 +426,8 @@
illnesslistget,
getillness,
} from "@/api/AiCentre/index";
+import { listDept } from "@/api/system/dept";
+
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -485,9 +481,11 @@
illnesslistapi: [],
illnesslist: [],
defaultProps: {
- children: "svyLibTopicCategoryList",
- label: "indexAssortName",
+ children: "svyLibTitleCategoryList",
+ label: "name",
},
+ deptList: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
mode: [],
languagelist: [],
qyoptions: [],
@@ -505,7 +503,7 @@
watch: {},
created() {
this.getList();
- // this.getDeptTree();
+ this.getDeptTree();
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
this.qyoptions = store.getters.usable;
@@ -520,6 +518,9 @@
this.userList = response.rows;
this.total = response.total;
this.loading = false;
+ });
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
});
},
@@ -675,29 +676,31 @@
let calssvalue = {};
if (
this.classifyform.pid &&
- this.classifyform.indexAssortName &&
+ this.classifyform.name &&
this.radio == "瀛愬垎绫�"
) {
const index = this.deptOptions.findIndex(
(obj) => obj.id == this.classifyform.pid
);
calssvalue = this.deptOptions[index];
- calssvalue.ivrLibaTemplateAssortList.push(this.classifyform);
- } else if (this.radio == "涓诲垎绫�" && this.classifyform.indexAssortName) {
+ calssvalue.svyLibTitleCategoryList.push(this.classifyform);
+ } else if (this.radio == "涓诲垎绫�" && this.classifyform.name) {
this.classifyform.pid = null;
- this.classifyform.ivrLibaTemplateAssortList = [];
+ this.classifyform.svyLibTitleCategoryList = [];
} else {
return this.$modal.msgError("璇峰~鍐欏畬鏁翠俊鎭�");
}
addQtemplateclassify(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
if (b.pid) {
this.$modal
- .confirm('鏄惁纭鍒犻櫎鍒嗙被椤逛负"' + b.indexAssortName + '"鐨勬暟鎹」锛�')
+ .confirm('鏄惁纭鍒犻櫎鍒嗙被椤逛负"' + b.name + '"鐨勬暟鎹」锛�')
.then(function () {
return delQtemplateclassify(b.id);
})
@@ -709,9 +712,7 @@
} else {
this.$modal
.confirm(
- '鏄惁纭鍒犻櫎涓�绾у垎绫�"' +
- b.indexAssortName +
- '"锛熷垹闄ゅ悗鍏朵笅鍒嗙被灏嗗綊绫烩�樻湭鍒嗙被鈥�'
+ '鏄惁纭鍒犻櫎涓�绾у垎绫�"' + b.name + '"锛熷垹闄ゅ悗鍏朵笅鍒嗙被灏嗗綊绫烩�樻湭鍒嗙被鈥�'
)
.then(() => {
return delQtemplateclassify(b.id);
@@ -727,7 +728,7 @@
// 绛涢�夎妭鐐�
filterNode(value, data) {
if (!value) return true;
- return data.indexAssortName.indexOf(value) !== -1;
+ return data.name.indexOf(value) !== -1;
},
handleNodeClick(data) {
this.queryParams.assortid = data.id;
diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index 70de25c..95f9611 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -536,8 +536,14 @@
</template>
<script>
-
import { messagelistpatient } from "@/api/patient/homepage";
+import {
+ getTaskpatient,
+ edithetask,
+ addhetask,
+ gethetaskinfo,
+ delhetaskinfo,
+} from "@/api/AiCentre/index";
import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
export default {
@@ -679,6 +685,9 @@
methods: {
// 鑾峰彇褰撳墠绫诲瀷
Acquisitiontype() {
+ getTaskpatient({ allhosp: 1 }).then((res) => {
+ console.log(res);
+ });
this.currenttype = this.$route.query.type;
console.log(this.currenttype);
if (this.currenttype == 1) {
diff --git a/src/views/repositoryai/general/index.vue b/src/views/repositoryai/general/index.vue
index 4388313..22b86bf 100644
--- a/src/views/repositoryai/general/index.vue
+++ b/src/views/repositoryai/general/index.vue
@@ -153,12 +153,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
- <el-table-column
- label="搴忓彿"
- align="center"
- key="targetid"
- prop="targetid"
- />
+ <el-table-column label="搴忓彿" align="center" key="id" prop="id" />
<el-table-column
label="閫氱敤搴撳悕绉�"
align="center"
@@ -463,6 +458,8 @@
addgeneralclassify(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
@@ -509,7 +506,7 @@
reset() {
this.indexform = {
suitWay: undefined,
- targetid: undefined,
+ id: undefined,
targetdesc: undefined,
baseTagList: [],
targetoptionList: [],
@@ -533,7 +530,7 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.targetid);
+ this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
@@ -585,7 +582,7 @@
this.targetoptionList
);
if (valid) {
- if (this.indexform.targetid != undefined) {
+ if (this.indexform.id != undefined) {
this.indexform.isoperation = 2;
editgeneral(this.indexform).then((response) => {
this.$modal.msgSuccess("淇敼鎴愬姛");
@@ -606,7 +603,7 @@
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
- const userIds = row.targetid || this.ids;
+ const userIds = row.id || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎閫氱敤搴撳悕绉颁负"' + row.targetname + '"鐨勬暟鎹」锛�')
.then(function () {
diff --git a/src/views/repositoryai/general/particulars/index.vue b/src/views/repositoryai/general/particulars/index.vue
index be402e9..a62d362 100644
--- a/src/views/repositoryai/general/particulars/index.vue
+++ b/src/views/repositoryai/general/particulars/index.vue
@@ -9,8 +9,8 @@
<el-table-column
label="搴忓彿"
align="center"
- key="targetid"
- prop="targetid"
+ key="id"
+ prop="id"
/>
<el-table-column
label="闂涓婚锛堢己锛�"
diff --git a/src/views/repositoryai/intention/index.vue b/src/views/repositoryai/intention/index.vue
index b7ae1d0..9d7591e 100644
--- a/src/views/repositoryai/intention/index.vue
+++ b/src/views/repositoryai/intention/index.vue
@@ -170,12 +170,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
- <el-table-column
- label="搴忓彿"
- align="center"
- key="targetid"
- prop="targetid"
- />
+ <el-table-column label="搴忓彿" align="center" key="id" prop="id" />
<el-table-column
label="鍊肩被鍨�"
align="center"
@@ -541,6 +536,9 @@
</el-table-column>
</el-table>
</el-card>
+ <el-card class="box-card" style="margin-bottom: 20px">
+ <Regular :TargetoptionList="testuserList" />
+ </el-card>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="娴嬭瘯杈撳叆" prop="nickName">
@@ -682,6 +680,7 @@
} from "@/api/AiCentre/index";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
+import Regular from "@/components/Regular"; //姝e垯缁勪欢
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listtag } from "@/api/system/label";
import store from "@/store";
@@ -689,7 +688,7 @@
export default {
name: "questionnaire",
dicts: ["sys_normal_disable", "sys_user_sex"],
- components: { Treeselect },
+ components: { Treeselect, Regular },
data() {
return {
topactiveName: "Local", //椤堕儴閫夋嫨
@@ -827,7 +826,7 @@
// 鐤剧梾-----------------------
illnessUpdate(row) {
this.illnessVisible = true;
- this.indexid = row.targetid;
+ this.indexid = row.id;
this.illnesslistapi = [];
const illnessqueryParams = {
pageNum: 1,
@@ -837,7 +836,7 @@
console.log(response);
this.optionsillness = response.rows;
});
- getillness({ outid: row.targetid, type: 1 }).then((res) => {
+ getillness({ outid: row.id, type: 1 }).then((res) => {
this.illnesslist = res.rows;
console.log(res);
});
@@ -949,7 +948,7 @@
addoption() {
const objvakue = {
guid: 1,
- targetid: this.indexform.targetid,
+ id: this.indexform.id,
targettype: this.indexform.targettype,
targetvalue: "璐",
targetregex: "(?!涓�.*|娌�.*|鏈�.*)^.*([璐钩鍑]|璐|璇勫|璇勫),10",
@@ -989,7 +988,7 @@
targetvalue: item.targetvalue,
targetregex: item.targetregex,
targetoptionid: item.targetoptionid,
- targetid: this.indexform.targetid,
+ id: this.indexform.id,
targettype: this.indexform.targettype,
isoperation: item.targetoptionid ? 2 : 1,
categoryName: item.categoryName,
@@ -1036,6 +1035,8 @@
addtreeselectIvrLibaTargetAssort(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
@@ -1082,7 +1083,7 @@
reset() {
this.indexform = {
suitWay: undefined,
- targetid: undefined,
+ id: undefined,
targetdesc: undefined,
baseTagList: [],
targetoptionList: [],
@@ -1104,7 +1105,7 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.targetid);
+ this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
@@ -1161,7 +1162,7 @@
this.targetoptionList
);
if (valid) {
- if (this.indexform.targetid != undefined) {
+ if (this.indexform.id != undefined) {
this.indexform.isoperation = 2;
gettargetInfoedit(this.indexform).then((response) => {
this.$modal.msgSuccess("淇敼鎴愬姛");
@@ -1182,7 +1183,7 @@
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
- const userIds = row.targetid || this.ids;
+ const userIds = row.id || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎鎸囨爣鍚嶇О涓�"' + row.targetname + '"鐨勬暟鎹」锛�')
.then(function () {
diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index b818ccc..1178af9 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -115,20 +115,27 @@
></el-col>
<el-col :span="12">
<el-form-item label="鎾姤浼樺厛" prop="playType">
- <el-radio-group v-model="ruleForm.playType">
- <el-radio
+ <el-select
+ v-model="ruleForm.playType"
+ size="medium"
+ filterable
+ placeholder="璇烽�夋嫨璇█"
+ >
+ <el-option
+ class="ruleFormaa"
v-for="item in precedencetype"
- :label="item.value"
- >{{ item.label }}</el-radio
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
>
- </el-radio-group>
- </el-form-item></el-col
- >
+ </el-option>
+ </el-select> </el-form-item
+ ></el-col>
</el-row>
<el-form-item label="闅忚鏂瑰紡" prop="region">
<el-select
style="width: 500px"
- v-model="ruleForm.way"
+ v-model="ruleForm.suitway"
size="medium"
multiple
filterable
@@ -229,7 +236,7 @@
</el-form-item>
<el-form-item label="閫傜敤闄㈠尯" prop="region">
<el-select
- v-model="campusvalue"
+ v-model="ruleForm.campus"
size="medium"
multiple
filterable
@@ -246,28 +253,23 @@
</el-select>
</el-form-item>
<el-form-item label="閫傜敤绉戝" prop="region">
- <el-select
- style="width: 500px"
- v-model="deptNamesvalue"
- size="medium"
- multiple
- filterable
- placeholder="璇烽�夋嫨鍒嗙被锛堝閫夛級"
+ <el-cascader
+ v-model="tempDetpRelevanceslist"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
>
- <el-option
- class="ruleFormaa"
- v-for="item in administrativelist"
- :key="item.label"
- :label="item.label"
- :value="item.label"
- >
- </el-option>
- </el-select>
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item label="閫氱敤搴�" prop="region">
<el-select
style="width: 500px"
- v-model="ruleForm.waya"
+ v-model="ruleForm.submoduleID"
size="medium"
multiple
filterable
@@ -341,7 +343,7 @@
>涓嬩竴姝�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="submitForm('ruleForm')"
+ <el-button @click="Departmenttreatment('ruleForm')"
>淇濆瓨闅忚妯$増鍩虹淇℃伅</el-button
>
</el-form-item>
@@ -356,32 +358,35 @@
type="primary"
icon="el-icon-plus"
round
- @click="drawer = true"
+ @click="getaddtopiclist"
>娣诲姞棰樼洰</el-button
>
</div>
<div class="presentation">
<div class="presentation-left">
<el-card class="box-card" style="min-height: 688px">
- <el-table v-loading="loading" :data="userList">
+ <el-table
+ v-loading="loading"
+ :data="ruleForm.ivrLibaTemplateScriptVOList"
+ >
<el-table-column
label="缂栧彿"
align="center"
- key="userid"
- prop="userid"
+ key="id"
+ prop="id"
/>
<el-table-column
label="鏍囬"
align="center"
- key="userName"
- prop="userName"
+ key="questiontitle"
+ prop="questiontitle"
:show-overflow-tooltip="true"
/>
<el-table-column
label="闂璇濇湳"
align="center"
- key="verbaltrick"
- prop="verbaltrick"
+ key="questionText"
+ prop="questionText"
:show-overflow-tooltip="true"
/>
@@ -402,7 +407,7 @@
type="danger"
icon="el-icon-delete"
circle
- @click="deloption(scope.row)"
+ @click="handleDelete(scope.row)"
></el-button>
<el-button
@click="syioption(scope.row)"
@@ -420,14 +425,6 @@
</el-table-column>
</el-table>
</el-card>
-
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
</div>
<div class="presentation-right">
<el-card class="box-card">
@@ -446,24 +443,40 @@
</div>
<el-form-item label="棰樼洰鏍囬">
<el-input
- v-model="topicobj.title"
+ v-model="topicobj.questiontitle"
placeholder="璇疯緭鍏ユ爣棰�"
></el-input>
</el-form-item>
<el-row :gutter="10">
<el-col :span="12"
- ><el-form-item label="鏄惁蹇呯瓟">
- <el-radio-group v-model="topicobj.resource">
- <el-radio label="鏄�"></el-radio>
- <el-radio label="鍚�"></el-radio>
- </el-radio-group> </el-form-item
+ ><el-form-item label="鏄惁蹇呭~">
+ <el-select
+ v-model="topicobj.ismandatory"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in required"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select> </el-form-item
></el-col>
<el-col :span="12"
- ><el-form-item label="鏄惁闅愯棌">
- <el-radio-group v-model="topicobj.resourcea">
- <el-radio label="鏄�"></el-radio>
- <el-radio label="鍚�"></el-radio>
- </el-radio-group> </el-form-item
+ ><el-form-item label="鏄惁鍙敤">
+ <el-select
+ v-model="topicobj.isavailable"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in usable"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select> </el-form-item
></el-col>
</el-row>
<div class="headline">
@@ -477,14 +490,17 @@
>
</div>
</div>
- <div class="topicxq" v-for="item in 2">
+ <div
+ class="topicxq"
+ v-for="item in topicobj.ivrLibaScriptTargetoptionList"
+ >
<el-row :gutter="10">
<el-col :span="12"
><el-form-item label="閫夐」鍚�">
<el-input
type="text"
placeholder="璇疯緭鍏�"
- v-model="queryParams.text"
+ v-model="item.targetvalue"
show-word-limit
>
</el-input> </el-form-item
@@ -494,7 +510,7 @@
<el-input
type="text"
placeholder="璇疯緭鍏ヨ妭鐐�"
- v-model="queryParams.text"
+ v-model="item.targetid"
show-word-limit
>
</el-input> </el-form-item
@@ -506,18 +522,18 @@
<el-input
type="text"
placeholder="(榛樿)鏃犲0"
- v-model="queryParams.text"
+ v-model="item.text"
maxlength="10"
show-word-limit
>
</el-input> </el-form-item
></el-col>
<el-col :span="12"
- ><el-form-item label="閫変腑璺宠浆">
+ ><el-form-item label="閫変腑璺宠浆(缂�)">
<el-input
type="text"
placeholder="璇疯緭鍏ラ鐩妭鐐�"
- v-model="queryParams.text"
+ v-model="item.jump"
show-word-limit
>
</el-input> </el-form-item
@@ -528,7 +544,7 @@
style="width: 24vw"
type="textarea"
placeholder="璇疯緭鍏ラ鍙�"
- v-model="queryParams.text"
+ v-model="item.targetregex"
show-word-limit
>
</el-input>
@@ -569,7 +585,9 @@
>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Saveproblem('ruleForm')">淇濆瓨棰樼洰鏁版嵁</el-button>
+ <el-button @click="Departmenttreatment('ruleForm')"
+ >淇濆瓨棰樼洰鏁版嵁</el-button
+ >
</div>
<!-- 闅忚妯$増棰勮 -->
<div v-if="Editprogress == 3">
@@ -642,35 +660,20 @@
>
<el-form-item label="鏍囬" prop="userName">
<el-input
- v-model="queryParams.userName"
+ v-model="queryParams.questiontitle"
placeholder="璇疯緭鍏�"
clearable
style="width: 200px"
- @keyup.enter.native="handleQuery"
+ @keyup.enter.native="getaddtopiclist"
/>
</el-form-item>
- <el-form-item label="涓婚" prop="sickness">
- <el-select
- v-model="ruleForm.classify"
- size="medium"
- placeholder="璇烽�夋嫨鍒嗙被"
- >
- <el-option
- class="ruleFormaa"
- v-for="item in themelist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
+
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="medium"
- @click="handleQuery"
+ @click="getaddtopiclist"
>鎼滅储</el-button
>
<el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
@@ -682,15 +685,15 @@
<el-table-column
label="鏍囬"
align="center"
- key="userName"
- prop="userName"
+ key="questiontitle"
+ prop="questiontitle"
width="100"
/>
<el-table-column
label="闂璇濇湳"
align="center"
- key="verbaltrick"
- prop="verbaltrick"
+ key="questionText"
+ prop="questionText"
width="200"
:show-overflow-tooltip="true"
/>
@@ -701,10 +704,7 @@
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="handleUpdate(scope.row)"
+ <el-button size="medium" type="text" @click="addtopic(scope.row)"
><span class="button-textxg"
><i class="el-icon-circle-plus-outline"></i>娣诲姞</span
></el-button
@@ -720,7 +720,7 @@
<script>
import { listtag } from "@/api/system/label";
import store from "@/store";
-
+import { listDept } from "@/api/system/dept";
import {
getFollowupclassify,
delFollowupclassify,
@@ -728,6 +728,8 @@
addtargetillness,
getvFollowup,
compileFollowup,
+ getverbaltricklist,
+ getverbaltrick,
delFollowupinfo,
Followupinfo,
getFollowuplist,
@@ -744,7 +746,6 @@
drawer: false, //鎺у埗灞曞紑
radios: [], //澶氶�夐閫変腑
radioas: "", //濉┖棰樼瓟妗�
- campusvalue: [], //闄㈠尯涓存椂瀛樺偍
labelInfovalue: [], //鏍囩涓存椂瀛樺偍
deptNamesvalue: [], //绉戝涓存椂瀛樺偍
dynamicTags: [],
@@ -759,7 +760,10 @@
optionstag: [],
prefollowuplist: [],
postfollowuplist: [],
- generallist: [{ value: "1", label: "闅忚閫氱敤搴撲竴" }],
+ generallist: [
+ { value: "1", label: "闅忚閫氱敤搴撲竴" },
+ { value: "2", label: "闅忚浜屽簱" },
+ ],
fileList: [
{
@@ -776,6 +780,7 @@
courtyardlist: [],
precedencetype: [],
usable: [],
+ required: [],
mode: [],
inputVisible: false,
inputVisibleillness: false,
@@ -788,6 +793,14 @@
children: "ivrLibaTemplateAssortList",
label: "indexAssortName",
},
+ tempDetpRelevanceslist: [],
+ variablelist: [
+ { variatename: "濮撳悕", variate: "${name}", default: 1 },
+ { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
+ ],
+ deptList: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
variablelist: [
{
@@ -846,6 +859,7 @@
this.auxiliary();
this.mode = store.getters.mode;
this.usable = store.getters.usable;
+ this.required = store.getters.required;
this.languagelist = store.getters.languagelist;
this.courtyardlist = store.getters.courtyardlist;
this.precedencetype = store.getters.precedencetype;
@@ -855,12 +869,24 @@
getIndexInArray(arr, obj) {
return arr.indexOf(obj);
},
+ processElement(element) {
+ return { ...element, isoperation: 0 };
+ },
// 鑾峰彇琛ㄥ崟鏁版嵁
getvFollowup() {
this.id = this.$route.query.id;
getvFollowup({ id: this.id }).then((res) => {
this.ruleForm = res.data;
+ this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
+ this.ruleForm.suitway = this.ruleForm.suitway.split(",");
+ this.ruleForm.campus = this.ruleForm.campus.split(",");
+ this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
+ this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
+ this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
+ this.processElement
+ );
+ console.log(this.ruleForm.suitway);
});
getillnesslist({
pageNum: 1,
@@ -870,6 +896,9 @@
});
getillness({ outid: this.id, type: 3 }).then((res) => {
this.illnesslist = res.rows;
+ });
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
});
},
// 闄勫睘鏁版嵁琛�
@@ -884,22 +913,60 @@
if (this.ruleForm.id) {
this.ruleForm.isoperation = 2;
} else {
- this.ruleForm.isoperation = 2;
+ this.ruleForm.isoperation = 1;
}
- this.ruleForm.campus = JSON.stringify(this.illnesslist);
- this.ruleForm.deptNames = this.deptNamesvalue.join(",");
this.ruleForm.labelInfo = JSON.stringify(this.dynamicTags);
+ this.ruleForm.suitway = this.ruleForm.suitway.join(",");
+ this.ruleForm.campus = this.ruleForm.campus.join(",");
+ this.ruleForm.submoduleID = this.ruleForm.submoduleID.join(",");
+
// 鎻愪氦
- this.$refs[formName].validate((valid) => {
- if (valid) {
- compileFollowup(this.ruleForm).then((res) => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- });
- } else {
- console.log("error submit!!");
- return false;
+
+ compileFollowup(this.ruleForm).then((res) => {
+ this.$modal.msgSuccess("缂栬緫鎴愬姛");
+ });
+ this.illnesslist.forEach((item, index) => {
+ if (!item.id) {
+ addtargetillness(item).then((res) => {});
}
});
+ if (this.illnesslistapi.length) {
+ deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
+ }
+ },
+ // 绉戝澶勭悊
+ Departmenttreatment() {
+ this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist);
+ console.log(this.tempDetpRelevanceslist);
+ const result = this.tempDetpRelevanceslist.map(
+ (subArr) => subArr[subArr.length - 1]
+ );
+ // id鏁扮粍鏌ユ暟缁勫璞�
+ result.forEach((item) => {
+ const condition = this.ruleForm.tempDetpRelevances.some(
+ (obj) => obj.deptId === item
+ );
+ if (!condition) {
+ listDept({ deptId: item }).then((res) => {
+ 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);
+ if (!condition) {
+ const index = this.ruleForm.tempDetpRelevances.indexOf(item);
+ this.ruleForm.tempDetpRelevances[index].delFlag = 1;
+ }
+ });
+ console.log(this.ruleForm.tempDetpRelevances);
+ setTimeout(() => {
+ this.submitForm();
+ }, 1000);
+ // this.submitForm();
},
// 涓嬩竴姝�
nextstep() {
@@ -928,8 +995,7 @@
});
});
},
- // 淇濆瓨棰樼洰淇℃伅
- Saveproblem() {},
+
/** 鏌ヨ棰樼洰鍒楄〃 */
getList() {
// this.loading = true;
@@ -976,7 +1042,7 @@
console.log(this.dynamicTags.indexOf(tag));
const lindex = this.dynamicTags.indexOf(tag);
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
- this.ruleForm.ivrLibaTemplateTargetList[lindex].isoperation = 3;
+ this.ruleForm.ivrLibaTemplateTagList[lindex].isoperation = 3;
},
handleInputConfirm() {
let tagvalue = {};
@@ -997,7 +1063,7 @@
isoperation: 1,
};
}
- this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue);
+ this.ruleForm.ivrLibaTemplateTagList.push(tagvalue);
this.dynamicTags.push(tagvalue);
});
}
@@ -1020,10 +1086,39 @@
showInput() {
this.inputVisible = true;
},
- //娴嬭瘯琛ㄥ崟 ---------------------------------
+ //璇濇湳棰樼洰----------------
addzbiao() {},
- handleUpdate() {},
- deloption(item) {
+ resetQuery() {
+ this.queryParams = { pageNum: 1, pageSize: 10 };
+ this.getaddtopiclist();
+ },
+ getaddtopiclist() {
+ this.drawer = true;
+ getverbaltricklist(this.queryParams).then((res) => {
+ this.loading = false;
+ this.userList = res.rows;
+ this.total = res.total;
+ console.log(this.userList);
+ });
+ },
+ addtopic(row) {
+ row.isoperation = 1;
+ this.ruleForm.ivrLibaTemplateScriptVOList.push(row);
+ },
+ handleDelete(row) {
+ this.ruleForm.ivrLibaTemplateScriptVOList.splice(
+ this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
+ 1
+ );
+ },
+ handleUpdate(row) {
+ console.log(row.id);
+ getverbaltrick({ id: row.id }).then((res) => {
+ this.topicobj = res.data;
+ console.log(res.data);
+ });
+ },
+ handleDelete(item) {
const index = this.userList.indexOf(item);
if (index !== -1) {
this.userList.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱�
@@ -1055,9 +1150,6 @@
console.log(this.userList);
},
// ---------------------
- // 鏌ヨ棰樺簱
- handleQuery() {},
- resetQuery() {},
resetForm(formName) {
this.$refs[formName].resetFields();
},
diff --git a/src/views/repositoryai/templateku/index.vue b/src/views/repositoryai/templateku/index.vue
index d09ab6b..cac920a 100644
--- a/src/views/repositoryai/templateku/index.vue
+++ b/src/views/repositoryai/templateku/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="Questionnairemanagement">
<!-- 宸︿晶鏍� -->
- <div class="sidecolumn" v-show="topactiveName == 'Local'">
+ <div class="sidecolumn">
<div class="sidecolumn-top">
<div class="top-wj">妯$増绫诲瀷</div>
<div class="top-tj" @click="dialogFormVisible = true">+娣诲姞</div>
@@ -44,7 +44,7 @@
</div>
</div>
<!-- 鍙充晶鏁版嵁 -->
- <div :class="topactiveName == 'Local' ? 'leftvlue' : 'leftvlues'">
+ <div class="leftvlue">
<div class="leftvlue-bg">
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
@@ -66,16 +66,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="閫傜敤绉戝" prop="status">
- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in languagelist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="閫傜敤绉戝" prop="region">
+ <el-cascader
+ v-model="queryParams.administrative"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
+ >
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf">
+ ({{ data.children.length }})
+ </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item label="鍙敤鐘舵��" prop="status">
<el-select v-model="queryParams.status" placeholder="璇烽�夋嫨">
@@ -157,7 +162,6 @@
</el-row>
<!-- 鏍囧噯妯$増 -->
<el-table
- v-if="topactiveName == 'Local'"
v-loading="loading"
:data="userList"
:border="true"
@@ -202,22 +206,6 @@
</el-table-column>
<el-table-column
- label="閫傜敤绉戝"
- align="center"
- key="deptNames"
- prop="deptNames"
- width="120"
- >
- <template slot-scope="scope">
- <div v-if="scope.row.deptNames">
- <span v-for="item in scope.row.deptNames.split(',')"
- >{{ item }}
- </span>
- </div>
- <div v-else>''</div>
- </template>
- </el-table-column>
- <el-table-column
label="鏍囩"
align="center"
key="labelInfo"
@@ -246,8 +234,8 @@
>
<template slot-scope="scope">
<div v-if="scope.row.campus">
- <span v-for="item in JSON.parse(scope.row.campus)"
- >{{ item.label }}
+ <span v-for="item in scope.row.campus.split(',')"
+ >{{ item }}銆�
</span>
</div>
<div v-else>
@@ -435,12 +423,14 @@
getvFollowup,
compileFollowup,
delFollowupinfo,
+ getverbaltricklist,
Followupinfo,
getFollowuplist,
getillnesslist,
illnesslistget,
getillness,
} from "@/api/AiCentre/index";
+import { listDept } from "@/api/system/dept";
export default {
name: "templateku",
data() {
@@ -512,6 +502,8 @@
children: "ivrLibaTemplateAssortList",
label: "indexAssortName",
},
+ deptList: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
mode: [],
languagelist: [],
qyoptions: [],
@@ -540,6 +532,11 @@
console.log(this.userList);
this.userList = res.rows;
this.total = res.total;
+
+ console.log(this.userList[0].campus.split(","));
+ });
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
});
},
@@ -657,6 +654,8 @@
addFollowupclassify(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
diff --git a/src/views/repositoryai/verbaltrick/index.vue b/src/views/repositoryai/verbaltrick/index.vue
index e0fedf6..e154f6d 100644
--- a/src/views/repositoryai/verbaltrick/index.vue
+++ b/src/views/repositoryai/verbaltrick/index.vue
@@ -68,7 +68,7 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="闂涓婚" prop="userName">
+ <el-form-item label="闂鏍囬" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="璇疯緭鍏�"
@@ -87,9 +87,9 @@
/>
</el-form-item>
<el-form-item label="閫傜敤鏂瑰紡" prop="status">
- <el-select v-model="queryParams.applyway" placeholder="璇烽�夋嫨">
+ <el-select v-model="queryParams.suitway" placeholder="璇烽�夋嫨">
<el-option
- v-for="item in languagelist"
+ v-for="item in mode"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -204,12 +204,12 @@
/><el-table-column
label="閫傜敤鏂瑰紡"
align="center"
- key="application"
- prop="application"
+ key="suitway"
+ prop="suitway"
width="120"
>
<template slot-scope="scope">
- <dict-tag :options="mode" :value="scope.row.suitWay" />
+ <dict-tag :options="mode" :value="scope.row.suitway" />
</template>
</el-table-column>
<el-table-column
@@ -523,7 +523,7 @@
getverbaltricklist(this.queryParams).then((res) => {
this.userList = res.rows;
this.loading = false;
- this.total=res.total
+ this.total = res.total;
});
},
@@ -615,6 +615,8 @@
addbaltrickclassify(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index 0d3bd1b..b0a4102 100644
--- a/src/views/repositoryai/verbaltrick/particulars/index.vue
+++ b/src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -44,7 +44,7 @@
placeholder="璇烽�夋嫨鐘舵��"
>
<el-option
- v-for="item in qyoptions"
+ v-for="item in usable"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -136,49 +136,51 @@
</div>
</el-form-item>
<el-form-item label="閫氱煡鍙橀噺" prop="name">
- <el-row v-for="item in variablelist">
- <el-col :span="4">
- <el-input
- v-model="item.name"
- placeholder="璇疯緭鍏ュ彉閲忓悕"
- ></el-input>
- </el-col>
- <el-col :span="8" :offset="1">
- <el-input
- v-model="item.value"
- placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
- ></el-input>
- </el-col>
- <el-col :span="4" :offset="1">
- <el-button
- type="success"
- icon="el-icon-plus"
- circle
- @click="addvariable(item)"
- ></el-button>
- <el-button
- v-if="item"
- type="danger"
- icon="el-icon-delete"
- circle
- @click="delvariable(item)"
- ></el-button>
- </el-col>
- </el-row>
+ <div style="margin-bottom: 5px" v-for="item in variablelist">
+ <el-row>
+ <el-col :span="5">
+ <el-input
+ v-model="item.variatename"
+ placeholder="璇疯緭鍏ュ彉閲忓悕"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-input
+ v-model="item.variate"
+ placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-button
+ type="success"
+ icon="el-icon-plus"
+ circle
+ @click="addvariable(item)"
+ ></el-button>
+ <el-button
+ v-if="!item.default"
+ type="danger"
+ icon="el-icon-delete"
+ circle
+ @click="delvariable(item)"
+ ></el-button>
+ </el-col>
+ </el-row>
+ </div>
</el-form-item>
<el-row>
- <el-col :span="12">
+ <el-col :span="6">
<el-form-item label="浠呴檺闄㈠尯" prop="region">
<el-select
- v-model="indexform.courtyard"
+ v-model="indexform.campus"
size="medium"
filterable
placeholder="璇烽�夋嫨"
>
<el-option
class="indexformaa"
- v-for="item in options"
+ v-for="item in courtyardlist"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -187,7 +189,24 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="6">
+ <el-form-item label="閫傜敤鏂瑰紡" prop="status">
+ <el-select
+ v-model="indexform.suitway"
+ multiple
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in mode"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
<el-form-item label="鍏宠仈鎸囨爣" prop="region">
<el-select
v-model="indexform.targetid"
@@ -196,13 +215,14 @@
reserve-keyword
placeholder="璇疯緭鍏ュ叧閿瘝"
:remote-method="remoteMethod"
+ @change="targetchange"
:loading="loading"
>
<el-option
v-for="item in targetlist"
- :key="item.targetid"
+ :key="item.id"
:label="item.targetname"
- :value="item.targetid"
+ :value="item.id"
>
</el-option>
</el-select>
@@ -219,7 +239,7 @@
class="tsgname"
@click="tsgnameto(item)"
>
- {{ item.name }}
+ {{ item.variatename }}
</div>
</div>
</el-col></el-row
@@ -377,8 +397,9 @@
>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="nextstep">纭� 瀹�</el-button>
+ <el-button type="primary" @click="nextstep">涓嬩竴姝�</el-button>
<el-button @click="closeFm">鍏� 闂�</el-button>
+ <el-button @click="Saveproblem()">淇濆瓨鏁版嵁</el-button>
</div>
</div>
<!-- 鎸囨爣璁剧疆 -->
@@ -518,7 +539,7 @@
</div>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
<el-button type="info" @click="closeFm()">鍏抽棴</el-button>
- <el-button @click="Saveproblem()">淇濆瓨鎸囨爣鏁版嵁</el-button>
+ <el-button @click="Saveproblem()">淇濆瓨鏁版嵁</el-button>
</div>
</div>
</div>
@@ -556,7 +577,7 @@
mode: [],
questionclass: [],
currentInputId: "",
-
+ courtyardlist: [],
// 鎬绘潯鏁�
total: 1,
@@ -576,9 +597,13 @@
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
},
],
- qyoptions: [],
+ usable: [],
options: [],
- variablelist: [],
+ variablelist: [
+ { variatename: "濮撳悕", variate: "${name}", default: 1 },
+ { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
+ ],
addvalue: "娣诲姞棰樼洰",
languagelist: [], //璇█鍒楄〃
@@ -601,7 +626,8 @@
this.mode = store.getters.mode;
this.valuetype = store.getters.valuetype;
this.languagelist = store.getters.languagelist;
- this.qyoptions = store.getters.usable;
+ this.usable = store.getters.usable;
+ this.courtyardlist = store.getters.courtyardlist;
},
methods: {
@@ -610,20 +636,20 @@
let id = this.$route.query.id;
getverbaltrick({ id: id }).then((res) => {
this.indexform = res.data;
+ this.indexform.suitway = this.indexform.suitway.split(",");
this.indexform.assortid = parseInt(this.indexform.assortid);
- this.variablelist = JSON.parse(this.indexform.parameter)
- ? JSON.parse(this.indexform.parameter)
- : [{ name: "", value: "" }];
+ this.variablelist = JSON.parse(this.indexform.otherdata).length
+ ? JSON.parse(this.indexform.otherdata)
+ : this.variablelist;
this.dynamicTags = this.indexform.ivrLibaScriptTagList.map(
this.processElement
);
this.targetlist = [
{
- targetid: this.indexform.targetid,
+ id: this.indexform.targetid,
targetname: this.indexform.targetname,
},
];
- console.log(this.targetlist);
});
// 鏍�
getbaltrickclassify({}).then((res) => {
@@ -634,12 +660,20 @@
// 淇濆瓨璇︾粏淇℃伅
Saveproblem() {
+ console.log(this.variablelist);
+ this.indexform.otherdata = JSON.stringify(this.variablelist);
+ this.indexform.suitway = this.indexform.suitway.join(",");
if (this.indexform.id) {
this.indexform.isoperation = 2;
- this.indexform.parameter = JSON.stringify(this.variablelist);
compileverbaltrick(this.indexform).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.$router.go(-1);
+ } else {
+ this.$message({
+ message: "淇敼澶辫触",
+ type: "error",
+ });
}
});
} else {
@@ -647,6 +681,12 @@
compileverbaltrick(this.indexform).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.$router.go(-1);
+ } else {
+ this.$message({
+ message: "鏂板澶辫触",
+ type: "error",
+ });
}
});
}
@@ -664,6 +704,24 @@
this.targetlist = [];
}
},
+ targetchange(res) {
+ console.log(res);
+ gettargetInfo({ id: res }).then((res) => {
+ this.indexform.targetname = res.rows[0].targetname;
+ this.$modal
+ .confirm('鏄惁娣诲姞"' + this.indexform.targetname + '"鎸囨爣鐨勯�夐」锛�')
+ .then(() => {
+ this.indexform.isenable = res.rows[0].isenable;
+ res.rows[0].targetoptionList.forEach((item) => {
+ item.isoperation = 1;
+ this.indexform.ivrLibaScriptTargetoptionList.push(item);
+ });
+ })
+ .catch(() => {
+ this.$modal.msgSuccess("宸插彇娑�");
+ });
+ });
+ },
// 涓嬩竴姝�
nextstep() {
@@ -671,14 +729,7 @@
if (this.indexform.ivrLibaScriptTargetoptionList.length) {
return this.Editprogress++;
}
- gettargetInfo({ targetid: this.indexform.targetid }).then((res) => {
- this.indexform.isenable = res.rows[0].isenable;
- this.indexform.targetname = res.rows[0].targetname;
- res.rows[0].targetoptionList.forEach((item) => {
- item.isoperation = 1;
- this.indexform.ivrLibaScriptTargetoptionList.push(item);
- });
- });
+
return this.Editprogress++;
} else {
this.$message.warning("璇峰厛閫夋嫨鍏宠仈鎸囨爣");
@@ -779,7 +830,6 @@
showInput() {
this.inputVisible = true;
},
- // --------------------------
//娴嬭瘯琛ㄥ崟 --------------------------
gettagerlist() {
gettagerlist({ targetname: this.targetname }).then((response) => {
@@ -796,7 +846,7 @@
});
this.sortFn();
},
- deloption() {
+ deloption(item) {
const index = this.indexform.ivrLibaScriptTargetoptionList.indexOf(item);
if (index !== -1) {
this.indexform.ivrLibaScriptTargetoptionList.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱�
@@ -870,7 +920,7 @@
// 鎷垮埌閫変腑鏂囧瓧鐨勯暱搴︼紙鍚庣画鍙互鐢ㄦ潵鏇挎崲閫変腑鐨勬枃瀛楋級
let selectLength = el.selectionEnd - el.selectionStart;
// 灏嗚鎻掑叆/鏇挎崲鐨勬枃瀛楁彃鍏�/鏇挎崲锛坴alue.name鏄鎻掑叆/鏇挎崲鐨勫瓧绗︿覆锛�
- inputValueArr.splice(el.selectionStart, selectLength, `${row.value}`);
+ inputValueArr.splice(el.selectionStart, selectLength, `${row.variate}`);
// 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪��
inputValueArr = inputValueArr.join("");
console.log(inputValueArr);
@@ -892,8 +942,8 @@
// 鏂板鍙橀噺
addvariable() {
this.variablelist.push({
- variable: "",
- value: "",
+ variatename: "",
+ variate: "",
});
},
// 鍒犻櫎鍙橀噺
diff --git a/src/views/shortmessage/healthinformation/index.vue b/src/views/shortmessage/healthinformation/index.vue
index 1b19a82..138c50c 100644
--- a/src/views/shortmessage/healthinformation/index.vue
+++ b/src/views/shortmessage/healthinformation/index.vue
@@ -65,19 +65,21 @@
v-show="showSearch"
label-width="98px"
>
- <el-form-item label="閫傜敤绉戝" prop="userName">
- <el-select
+ <el-form-item label="閫傜敤绉戝" prop="region">
+ <el-cascader
v-model="queryParams.administrative"
- placeholder="璇烽�夋嫨"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
>
- <el-option
- v-for="item in optionks"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf">
+ ({{ data.children.length }})
+ </span>
+ </template>
+ </el-cascader>
</el-form-item>
<el-form-item label="閫氱煡鏍囬" prop="userName">
<el-input
@@ -420,19 +422,21 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="閫傜敤绉戝" prop="userName">
- <el-select
- v-model="indexform.useofstateks"
- multiple
- placeholder="璇烽�夋嫨(澶氶��)"
+ <el-form-item label="閫傜敤绉戝" prop="region">
+ <el-cascader
+ v-model="indexform.administrative"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
>
- <el-option
- v-for="index in optionks"
- :key="index.value"
- :label="index.label"
- :value="index.value"
- ></el-option>
- </el-select>
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf">
+ ({{ data.children.length }})
+ </span>
+ </template>
+ </el-cascader>
</el-form-item>
</el-col>
</el-row>
@@ -512,6 +516,7 @@
addUser,
updateUser,
} from "@/api/system/user";
+import { listDept } from "@/api/system/dept";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -741,6 +746,8 @@
},
],
},
+ deptList: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
};
},
watch: {},
@@ -767,6 +774,9 @@
// const { rows } = await listUser();
// console.log(rows);
// this.list = rows;
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
+ });
},
// 娣诲姞銆佷慨鏀圭被鍒�
submitsidecolumn() {
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index e502b4e..841e3c4 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -1,6 +1,12 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ >
<el-form-item label="閮ㄩ棬鍚嶇О" prop="deptName">
<el-input
v-model="queryParams.deptName"
@@ -10,7 +16,11 @@
/>
</el-form-item>
<el-form-item label="鐘舵��" prop="status">
- <el-select v-model="queryParams.status" placeholder="閮ㄩ棬鐘舵��" clearable>
+ <el-select
+ v-model="queryParams.status"
+ placeholder="閮ㄩ棬鐘舵��"
+ clearable
+ >
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
@@ -20,8 +30,16 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="mini"
+ @click="handleQuery"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
</el-form-item>
</el-form>
@@ -34,7 +52,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:dept:add']"
- >鏂板</el-button>
+ >鏂板</el-button
+ >
</el-col>
<el-col :span="1.5">
<el-button
@@ -43,9 +62,13 @@
icon="el-icon-sort"
size="mini"
@click="toggleExpandAll"
- >灞曞紑/鎶樺彔</el-button>
+ >灞曞紑/鎶樺彔</el-button
+ >
</el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+ <right-toolbar
+ :showSearch.sync="showSearch"
+ @queryTable="getList"
+ ></right-toolbar>
</el-row>
<el-table
@@ -54,21 +77,41 @@
:data="deptList"
row-key="deptId"
:default-expand-all="isExpandAll"
- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
- <el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="260"></el-table-column>
- <el-table-column prop="orderNum" label="鎺掑簭" width="200"></el-table-column>
+ <el-table-column
+ prop="deptName"
+ label="閮ㄩ棬鍚嶇О"
+ width="260"
+ ></el-table-column>
+ <el-table-column
+ prop="orderNum"
+ label="鎺掑簭"
+ width="200"
+ ></el-table-column>
<el-table-column prop="status" label="鐘舵��" width="100">
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+ <dict-tag
+ :options="dict.type.sys_normal_disable"
+ :value="scope.row.status"
+ />
</template>
</el-table-column>
- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="200">
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ align="center"
+ prop="createTime"
+ width="200"
+ >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ class-name="small-padding fixed-width"
+ >
<template slot-scope="scope">
<el-button
size="mini"
@@ -76,14 +119,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:edit']"
- >淇敼</el-button>
+ >淇敼</el-button
+ >
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']"
- >鏂板</el-button>
+ >鏂板</el-button
+ >
<el-button
v-if="scope.row.parentId != 0"
size="mini"
@@ -91,7 +136,8 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dept:remove']"
- >鍒犻櫎</el-button>
+ >鍒犻櫎</el-button
+ >
</template>
</el-table-column>
</el-table>
@@ -102,7 +148,12 @@
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="涓婄骇閮ㄩ棬" prop="parentId">
- <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="閫夋嫨涓婄骇閮ㄩ棬" />
+ <treeselect
+ v-model="form.parentId"
+ :options="deptOptions"
+ :normalizer="normalizer"
+ placeholder="閫夋嫨涓婄骇閮ㄩ棬"
+ />
</el-form-item>
</el-col>
</el-row>
@@ -114,26 +165,42 @@
</el-col>
<el-col :span="12">
<el-form-item label="鏄剧ず鎺掑簭" prop="orderNum">
- <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
+ <el-input-number
+ v-model="form.orderNum"
+ controls-position="right"
+ :min="0"
+ />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="璐熻矗浜�" prop="leader">
- <el-input v-model="form.leader" placeholder="璇疯緭鍏ヨ礋璐d汉" maxlength="20" />
+ <el-input
+ v-model="form.leader"
+ placeholder="璇疯緭鍏ヨ礋璐d汉"
+ maxlength="20"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
- <el-input v-model="form.phone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" maxlength="11" />
+ <el-input
+ v-model="form.phone"
+ placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+ maxlength="11"
+ />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="閭" prop="email">
- <el-input v-model="form.email" placeholder="璇疯緭鍏ラ偖绠�" maxlength="50" />
+ <el-input
+ v-model="form.email"
+ placeholder="璇疯緭鍏ラ偖绠�"
+ maxlength="50"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -143,7 +210,8 @@
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
- >{{dict.label}}</el-radio>
+ >{{ dict.label }}</el-radio
+ >
</el-radio-group>
</el-form-item>
</el-col>
@@ -158,13 +226,20 @@
</template>
<script>
-import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
+import {
+ listDept,
+ getDept,
+ delDept,
+ addDept,
+ updateDept,
+ listDeptExcludeChild,
+} from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Dept",
- dicts: ['sys_normal_disable'],
+ dicts: ["sys_normal_disable"],
components: { Treeselect },
data() {
return {
@@ -187,36 +262,36 @@
// 鏌ヨ鍙傛暟
queryParams: {
deptName: undefined,
- status: undefined
+ status: undefined,
},
// 琛ㄥ崟鍙傛暟
form: {},
// 琛ㄥ崟鏍¢獙
rules: {
parentId: [
- { required: true, message: "涓婄骇閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "涓婄骇閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" },
],
deptName: [
- { required: true, message: "閮ㄩ棬鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "閮ㄩ棬鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
],
orderNum: [
- { required: true, message: "鏄剧ず鎺掑簭涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "鏄剧ず鎺掑簭涓嶈兘涓虹┖", trigger: "blur" },
],
email: [
{
type: "email",
message: "璇疯緭鍏ユ纭殑閭鍦板潃",
- trigger: ["blur", "change"]
- }
+ trigger: ["blur", "change"],
+ },
],
phone: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
- trigger: "blur"
- }
- ]
- }
+ trigger: "blur",
+ },
+ ],
+ },
};
},
created() {
@@ -226,8 +301,9 @@
/** 鏌ヨ閮ㄩ棬鍒楄〃 */
getList() {
this.loading = true;
- listDept(this.queryParams).then(response => {
+ listDept(this.queryParams).then((response) => {
this.deptList = this.handleTree(response.data, "deptId");
+ console.log(this.deptList);
this.loading = false;
});
},
@@ -239,7 +315,7 @@
return {
id: node.deptId,
label: node.deptName,
- children: node.children
+ children: node.children,
};
},
// 鍙栨秷鎸夐挳
@@ -257,7 +333,7 @@
leader: undefined,
phone: undefined,
email: undefined,
- status: "0"
+ status: "0",
};
this.resetForm("form");
},
@@ -278,7 +354,7 @@
}
this.open = true;
this.title = "娣诲姞閮ㄩ棬";
- listDept().then(response => {
+ listDept().then((response) => {
this.deptOptions = this.handleTree(response.data, "deptId");
});
},
@@ -293,31 +369,35 @@
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset();
- getDept(row.deptId).then(response => {
+ getDept(row.deptId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "淇敼閮ㄩ棬";
- listDeptExcludeChild(row.deptId).then(response => {
+ listDeptExcludeChild(row.deptId).then((response) => {
this.deptOptions = this.handleTree(response.data, "deptId");
if (this.deptOptions.length == 0) {
- const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] };
+ const noResultsOptions = {
+ deptId: this.form.parentId,
+ deptName: this.form.parentName,
+ children: [],
+ };
this.deptOptions.push(noResultsOptions);
}
});
});
},
/** 鎻愪氦鎸夐挳 */
- submitForm: function() {
- this.$refs["form"].validate(valid => {
+ submitForm: function () {
+ this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.deptId != undefined) {
- updateDept(this.form).then(response => {
+ updateDept(this.form).then((response) => {
this.$modal.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
});
} else {
- addDept(this.form).then(response => {
+ addDept(this.form).then((response) => {
this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
@@ -328,13 +408,17 @@
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
- this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.deptName + '"鐨勬暟鎹」锛�').then(function() {
- return delDept(row.deptId);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
- }
- }
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.deptName + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return delDept(row.deptId);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ },
};
</script>
--
Gitblit v1.9.3