From e06cd3953ba8a6e0eee11c235bce9ced419a2800 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 03 六月 2026 14:05:08 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/questionnaire/compilequer/index.vue | 962 +++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 811 insertions(+), 151 deletions(-)
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index a2e96e7..3f34e32 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -117,27 +117,6 @@
</el-form-item>
</el-col>
</el-row>
- <!-- <el-row :gutter="20">
- <el-col :span="10">
- <el-form-item label="闀挎湡浠诲姟" prop="longTemp">
- <el-radio-group v-model="ruleForm.longTemp">
- <el-radio
- v-for="(item, index) in longtype"
- :label="item.value"
- >{{ item.label }}</el-radio
- >
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="ruleForm.longTemp">
- <el-form-item label="浠诲姟鍛ㄦ湡锛堝嚑澶╁悗锛�" prop="name">
- <el-input
- v-model="ruleForm.sendDay"
- placeholder="榛樿5澶╁悗"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
<el-row>
<el-form-item prop="dynamicTags">
@@ -261,9 +240,9 @@
>
<el-option
class="ruleFormaa"
- v-for="item in belongDepts"
- :key="item.deptCode"
- :label="item.deptName"
+ v-for="item in flatArray"
+ :key="item.id"
+ :label="item.label"
:value="item.deptCode"
>
</el-option>
@@ -280,14 +259,14 @@
size="medium"
multiple
filterable
- placeholder="璇烽�夋嫨绉戝"
+ placeholder="璇烽�夋嫨鐥呭尯"
>
<el-option
class="ruleFormaa"
- v-for="item in belongWards"
- :key="item.districtCode"
- :label="item.districtName"
- :value="item.districtCode"
+ v-for="item in flatArray"
+ :key="item.id"
+ :label="item.label"
+ :value="item.deptCode"
>
</el-option>
</el-select> </el-form-item
@@ -310,7 +289,7 @@
>涓嬩竴姝�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Departmenttreatment('ruleForm')"
+ <el-button @click="toExamine('ruleForm')"
>淇濆瓨闂嵎鍩虹淇℃伅</el-button
>
</el-form-item>
@@ -400,6 +379,20 @@
</template>
</el-table-column>
<el-table-column
+ label="缁村害"
+ align="center"
+ key="dimension"
+ prop="dimension"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.dimensionality_type"
+ :value="scope.row.dimension"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
v-if="!Operateit"
label="闂鍐呭"
align="center"
@@ -435,7 +428,6 @@
align="center"
key="nextScriptno"
prop="nextScriptno"
- :show-overflow-tooltip="true"
>
<template slot-scope="scope">
<span>{{
@@ -544,12 +536,32 @@
<el-col :span="12">
<el-form-item
label="闂鍒嗗��"
- v-if="topicobj.scoretype == 1"
+ v-if="ruleForm.scoreType == 1"
>
<el-input
v-model="topicobj.score"
placeholder="璇疯緭鍏ラ鍙�"
></el-input>
+ </el-form-item>
+
+ <el-form-item prop="valueType">
+ <template #label>
+ 缁撴灉绫诲瀷
+ <el-tooltip
+ class="item"
+ effect="light"
+ content="鏈被鍨嬩负缁撴灉鏀堕泦绫诲瀷锛涢�夐」鐢ㄤ簬鎸囧悜鎬ч鐩鏄惁绛夛紱鏂囨湰閫傜敤澶嶆潅鎯呭喌锛涙暟鍊肩敤浜庢敹闆嗘暟鍊煎瀷鏁版嵁"
+ placement="top-start"
+ >
+ <i class="el-icon-warning-outline"></i>
+ </el-tooltip>
+ <!-- 鍦ㄦ爣绛惧悗鎻掑叆绾㈣壊鏄熷彿 -->
+ </template>
+ <el-radio-group v-model="topicobj.valueType">
+ <el-radio :label="1">閫夐」</el-radio>
+ <el-radio :label="2">鏂囨湰</el-radio>
+ <el-radio :label="3">鏁板��</el-radio>
+ </el-radio-group>
</el-form-item>
</el-col>
</el-row>
@@ -567,10 +579,10 @@
</el-form-item></el-col
>
<el-col :span="12"
- ><el-form-item label="鏄惁鍙敤">
- <el-radio-group v-model="topicobj.isenable">
+ ><el-form-item label="鏄惁闅愯棌">
+ <el-radio-group v-model="topicobj.ishide">
<el-radio
- v-for="(item, index) in usable"
+ v-for="(item, index) in hides"
:label="item.value"
>{{ item.label }}</el-radio
>
@@ -583,8 +595,8 @@
v-if="topicobj.scriptType == 1"
>
<el-radio-group v-model="topicobj.branchFlag">
- <el-radio :label="1">鏄�</el-radio>
- <el-radio :label="0">鍚�</el-radio>
+ <el-radio label="1">鏄�</el-radio>
+ <el-radio label="0">鍚�</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="閫変腑鎻愮ず" v-if="topicobj.scriptType != 1">
@@ -606,7 +618,7 @@
v-for="item in topicobj.svyLibTemplateTargetoptions"
>
<el-row :gutter="5">
- <el-col :span="16"
+ <el-col :span="12"
><el-form-item label="閫夐」鍚嶇О">
<el-input
type="text"
@@ -616,9 +628,9 @@
>
</el-input> </el-form-item
></el-col>
- <el-col :span="8">
+ <el-col :span="12">
<el-form-item
- v-if="topicobj.scoretype == 1"
+ v-if="ruleForm.scoreType == 1"
label="閫夐」鍒嗗��"
>
<el-input
@@ -631,17 +643,17 @@
</el-input>
</el-form-item>
<el-form-item
- v-else-if="topicobj.scoretype == 2"
+ v-else-if="ruleForm.scoreType == 2"
label="ABC绛夌骇"
>
<el-radio-group v-model="item.score">
- <el-radio label="A">A</el-radio>
- <el-radio label="B">B</el-radio>
- <el-radio label="C">C</el-radio>
+ <el-radio :label="1">A</el-radio>
+ <el-radio :label="2">B</el-radio>
+ <el-radio :label="3">C</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
- v-else-if="topicobj.scoretype == 3"
+ v-else-if="ruleForm.scoreType == 3"
label="浼樿壇绛夌骇"
>
<el-radio-group v-model="item.score">
@@ -652,13 +664,86 @@
</el-form-item>
</el-col>
</el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鍏宠仈鏈嶅姟">
+ <div
+ v-if="item.sendTaskname"
+ class="service-tag-container"
+ >
+ <el-tag
+ type="success"
+ closable
+ @close="removeService(item)"
+ class="service-tag"
+ >
+ <i class="el-icon-connection service-icon"></i>
+ {{ item.sendTaskname }}
+ </el-tag>
+ </div>
+ <div v-else class="service-add-btn">
+ <el-button
+ type="success"
+ size="small"
+ icon="el-icon-plus"
+ @click="openServiceDialog(item)"
+ class="add-service-btn"
+ >
+ 閫夋嫨浠诲姟
+ </el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="榛樿閫夐」">
+ <el-radio-group v-model="item.defaultValue">
+ <el-radio :label="2">鏄�</el-radio>
+ <el-radio :label="1">鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
<el-row :gutter="10">
- <el-form-item label="寮傚父鎻愰啋">
- <el-radio-group v-model="item.isabnormal">
- <el-radio :label="1">鏄�</el-radio>
- <el-radio :label="0">鍚�</el-radio>
- </el-radio-group>
- </el-form-item>
+ <el-col :span="11">
+ <!-- 淇敼锛氬紓甯告彁閱掗儴鍒� -->
+ <el-form-item label="寮傚父鎻愰啋">
+ <el-select
+ v-model="item.isabnormal"
+ placeholder="璇烽�夋嫨鐘舵��"
+ >
+ <el-option
+ :value="0"
+ label="姝e父"
+ :style="{ color: '#67C23A' }"
+ >
+ <span style="color: #67c23a">鈼� 姝e父</span>
+ </el-option>
+
+ <el-option
+ :value="2"
+ label="璀﹀憡"
+ :style="{ color: '#FFBA00' }"
+ >
+ <span style="color: #ffba00">鈼� 璀﹀憡</span>
+ </el-option>
+ <el-option
+ :value="1"
+ label="寮傚父"
+ :style="{ color: '#f75c5c' }"
+ >
+ <span style="color: #f75c5c">鈼� 寮傚父</span>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="11">
+ <el-form-item label="鏄惁閫変腑鏀堕泦闄勫姞淇℃伅">
+ <el-radio-group v-model="item.appendflag">
+ <el-radio label="1">鏄�</el-radio>
+ <el-radio label="0">鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
</el-row>
<el-row :gutter="10" v-if="topicobj.branchFlag == 1">
<el-col :span="20"
@@ -692,7 +777,9 @@
<el-image
style="width: 100px; height: 100px"
:src="item.picturePath"
- :preview-src-list="[...item.picturePath]"
+ :preview-src-list="
+ item.picturePath ? [item.picturePath] : []
+ "
>
</el-image>
</div>
@@ -703,6 +790,14 @@
</div>
<div v-else>
<div class="topicxq">
+ <el-row>
+ <el-form-item label="鏄惁浣滀负鎰忚鏀堕泦棰樼洰">
+ <el-radio-group v-model="topicobj.isMydException">
+ <el-radio label="1">鏄�</el-radio>
+ <el-radio label="0">鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-row>
<el-row :gutter="10">
<el-form-item label="绛旀">
<el-input
@@ -748,9 +843,7 @@
>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Departmenttreatment('ruleForm')"
- >淇濆瓨闂鏁版嵁</el-button
- >
+ <el-button @click="toExamine('ruleForm')">淇濆瓨闂鏁版嵁</el-button>
</div>
<!-- 闂嵎棰勮 -->
<div v-if="Editprogress == 3">
@@ -765,7 +858,7 @@
v-if="item.scriptType == 1"
>
<div class="dev-text">
- {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
+ {{ item.sort }}. [鍗曢�塢<span>{{ item.scriptContent }}</span>
</div>
<div class="dev-xx">
<el-radio-group v-model="item.remark">
@@ -785,7 +878,7 @@
v-if="item.scriptType == 2"
>
<div class="dev-text">
- {{ item.sort }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
+ {{ item.sort }}. [澶氶�塢<span>{{ item.scriptContent }}</span>
</div>
<div class="dev-xx">
<el-checkbox-group v-model="qremark">
@@ -982,7 +1075,7 @@
<el-col :span="12">
<el-form-item label="璇勪环绫诲瀷">
<el-select
- v-model="indexform.scoretype"
+ v-model="indexform.scoreType"
placeholder="璇烽�夋嫨鍒嗙被"
>
<el-option
@@ -1105,15 +1198,15 @@
<div class="basics">
閫夐」璁剧疆
<span style="margin-left: 30px"
- ><el-button type="primary" round @click="addoption"
- >+鏂板</el-button
+ ><el-button class="addoption-btn" @click="addoption"
+ >+鏂板閫夐」</el-button
></span
>
</div>
</div>
<el-divider></el-divider>
<div
- class="topicxq"
+ class="topic-card"
v-for="item in indexform.svyLibTemplateTargetoptions"
v-if="item.isoperation != 3"
>
@@ -1123,7 +1216,7 @@
<el-input
style="width: 400px"
type="text"
- placeholder="璇疯緭鍏ラ�夐」鍒嗗��"
+ placeholder="璇疯緭鍏ラ�夐」鍚嶇О"
v-model="item.optioncontent"
show-word-limit
>
@@ -1131,7 +1224,7 @@
></el-col>
<el-col :span="11">
<el-form-item
- v-if="indexform.scoretype == 1"
+ v-if="indexform.scoreType == 1"
label="鍒嗗��"
>
<el-input
@@ -1143,17 +1236,17 @@
</el-input>
</el-form-item>
<el-form-item
- v-else-if="indexform.scoretype == 2"
+ v-else-if="indexform.scoreType == 2"
label="ABC绛夌骇"
>
<el-radio-group v-model="item.score">
- <el-radio label="A">A</el-radio>
- <el-radio label="B">B</el-radio>
- <el-radio label="C">C</el-radio>
+ <el-radio :label="1">A</el-radio>
+ <el-radio :label="2">B</el-radio>
+ <el-radio :label="3">C</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
- v-else-if="indexform.scoretype == 3"
+ v-else-if="indexform.scoreType == 3"
label="浼樿壇绛夌骇"
>
<el-radio-group v-model="item.score">
@@ -1166,7 +1259,7 @@
<el-col
:span="2"
- :offsset="indexform.scoretype == 4 ? 11 : 0"
+ :offsset="indexform.scoreType == 4 ? 11 : 0"
>
<el-button
type="danger"
@@ -1213,7 +1306,9 @@
<el-image
style="width: 100px; height: 100px"
:src="item.picturePath"
- :preview-src-list="[...item.picturePath]"
+ :preview-src-list="
+ item.picturePath ? [item.picturePath] : []
+ "
>
</el-image>
</div>
@@ -1227,6 +1322,144 @@
</el-tabs>
</div>
</el-drawer>
+ <!-- 閫夋嫨浠诲姟寮圭獥 -->
+ <el-dialog
+ title="閫夋嫨浠诲姟"
+ :visible.sync="serviceDialogVisible"
+ width="50%"
+ >
+ <div>
+ <el-form
+ :model="topqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ label-width="98px"
+ >
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ v-model="topqueryParams.taskName"
+ @keyup.enter.native="handleQuery"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="浠诲姟绫诲瀷" prop="status">
+ <el-select
+ v-model="topqueryParams.serviceType"
+ placeholder="璇烽�夋嫨鏈嶅姟绫诲瀷"
+ >
+ <el-option
+ v-for="item in taskoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <el-table
+ :data="filteredServiceList"
+ v-loading="taskloading"
+ @selection-change="handleServiceSelectionChange"
+ >
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ align="center"
+ key="taskName"
+ prop="taskName"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="浠诲姟鎻忚堪"
+ align="center"
+ key="taskDesc"
+ prop="taskDesc"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鏈嶅姟椤圭洰"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鎬讳换鍔�/宸查殢璁�"
+ align="center"
+ key="nickName"
+ width="120"
+ prop="nickName"
+ >
+ <template slot-scope="scope">
+ <span
+ >{{
+ scope.row.wfs || scope.row.wfs == 0
+ ? scope.row.wfs + scope.row.yfs
+ : ""
+ }}/{{ scope.row.yfs }}</span
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鏄惁闀挎湡浠诲姟"
+ align="center"
+ key="longTask"
+ prop="longTask"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.longTask ? "闀挎湡浠诲姟" : "闈為暱鏈�" }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="鐘舵��"
+ align="center"
+ key="sendState"
+ prop="sendState"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.task_status"
+ :value="scope.row.sendState"
+ />
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="鍒涘缓浜�"
+ align="center"
+ key="createBy"
+ prop="createBy"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ sortable
+ align="center"
+ prop="createTime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ v-show="tasktotal > 0"
+ :total="tasktotal"
+ :page.sync="topqueryParams.pageNum"
+ :limit.sync="topqueryParams.pageSize"
+ @pagination="gettaskList"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="serviceDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="confirmServiceSelection"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
<!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
<Optional-Form
ref="child"
@@ -1248,25 +1481,25 @@
depthospgetsonlist,
getQtemplateobj,
compileQtemplate,
- Qtemplateinfo,
- compileissue,
- delQtemplateinfo,
- Followupinfo,
- issueinfo,
getissuelist,
depthospgetsondel,
deltargetillness,
addtargetillness,
getillnesslist,
- illnesslistget,
+ getTasklist,
getillness,
} from "@/api/AiCentre/index";
import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
import { getToken } from "@/utils/auth";
+import { deptTreeSelect } from "@/api/system/user";
export default {
- name: "Questionnaireinfo",
-
+ dicts: [
+ "sys_normal_disable",
+ "dimensionality_type",
+ "sys_user_sex",
+ "task_status",
+ ],
components: { OptionalForm },
data() {
@@ -1289,12 +1522,44 @@
dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
inputValue: "",
topicobj: {},
+ topqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ type: 3,
+ },
+ tasktotal: 0,
+ taskloading: false,
+ taskoptions: [
+ {
+ value: 4,
+ label: "瀹f暀鍏虫��",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 5,
+ label: "澶嶈瘖閫氱煡",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ ],
// 鎬绘潯鏁�
total: 1,
+ serviceDialogVisible: false, // 閫夋嫨浠诲姟寮圭獥鏄剧ず鎺у埗
+ serviceSearch: "", // 浠诲姟鎼滅储鍏抽敭璇�
+ serviceList: [], // 浠诲姟鍒楄〃
+ filteredServiceList: [],
+ selectedService: null, // 閫変腑鐨勪换鍔�
+ currentOptionItem: null, // 褰撳墠姝e湪璁剧疆鐨勪换鍔¢�夐」椤�
ruleForm: {
svyTemplateLibScripts: [],
tempDetpRelevances: [],
svyLibTemplateTagList: [],
+ suitway: [],
scoreType: "4",
isenable: "0",
longTemp: "0",
@@ -1383,6 +1648,7 @@
illnessVisible: false, //鎸囨爣鐤剧梾寮规
Operateit: true,
deptOptions: [],
+ flatArray: [],
optionsillness: [],
delScriptVOList: [],
illnesslistapi: [],
@@ -1399,6 +1665,10 @@
usable: [
{ value: "0", label: "鍙敤" },
{ value: "1", label: "鍋滅敤" },
+ ],
+ hides: [
+ { value: 0, label: "姝e父" },
+ { value: 1, label: "闅愯棌" },
],
longtype: [
{ value: "0", label: "鏅�氫换鍔�" },
@@ -1435,6 +1705,7 @@
this.ruleForm.svyLibTemplateTagList.filter(
(item) => item.isoperation != 3
);
+ if (this.ruleForm.suitway)
this.ruleForm.suitway = this.ruleForm.suitway.split(",");
this.delScriptVOList = [];
this.tempDetpRelevanceslistform = [];
@@ -1445,6 +1716,7 @@
created() {
this.getissueinfo();
this.gettabList();
+ this.getDeptTree();
this.mode = store.getters.Askmode;
this.languagelist = store.getters.languagelist;
this.usable = store.getters.usable;
@@ -1455,8 +1727,6 @@
this.appraiselist = store.getters.appraiselist;
this.belongWards = store.getters.belongWards;
this.belongDepts = store.getters.belongDepts;
- console.log(this.belongWards, "belongWards");
- console.log(this.belongDepts, "belongDepts");
// this.test();
},
@@ -1518,7 +1788,9 @@
this.dynamicTags = this.ruleForm.svyLibTemplateTagList.map(
this.processElement
);
- this.ruleForm.suitway = this.ruleForm.suitway.split(",");
+ console.log(this.dynamicTags, "this.dynamicTags");
+ if (this.ruleForm.suitway)
+ this.ruleForm.suitway = this.ruleForm.suitway.split(",");
});
getillness({ outid: this.id, type: 5 }).then((res) => {
this.illnesslist = res.rows;
@@ -1536,21 +1808,49 @@
});
this.tempDetpRelevanceslist = [];
this.tempbelongWards = [];
-
- depthospgetsonlist(this.queryParamsdept).then((res) => {
- if (res.code == 200) {
- let arr = res.rows;
- arr.forEach((item) => {
- if (item.deptType == 1) {
- this.deptlist.push(item);
- this.tempDetpRelevanceslist.push(item.deptCode);
- } else if (item.deptType == 2) {
- this.hosplist.push(item);
- this.tempbelongWards.push(item.deptCode);
- }
- });
- }
+ if (this.queryParamsdept.tempid) {
+ depthospgetsonlist(this.queryParamsdept).then((res) => {
+ if (res.code == 200) {
+ let arr = res.rows;
+ arr.forEach((item) => {
+ if (item.deptType == 1) {
+ this.deptlist.push(item);
+ this.tempDetpRelevanceslist.push(item.deptCode);
+ } else if (item.deptType == 2) {
+ this.hosplist.push(item);
+ this.tempbelongWards.push(item.deptCode);
+ }
+ });
+ }
+ });
+ }
+ },
+ // 鑾峰彇绉戝鏍�
+ getDeptTree() {
+ // 绉戝鍒楄〃
+ deptTreeSelect().then((response) => {
+ this.deptOptions = response.data;
+ this.flatArray = this.flattenArray(response.data);
});
+ },
+ flattenArray(multiArray) {
+ let result = [];
+
+ // 閫掑綊鍑芥暟锛岀敤浜庡皢澶氱骇鏁扮粍杞崲涓轰竴缁存暟缁勶紝鍙寘鍚渶搴曞眰鐨勫厓绱�
+ function flatten(element) {
+ // 濡傛灉褰撳墠鍏冪礌鏈夊瓙鍏冪礌锛岀户缁�掑綊
+ if (element.children && element.children.length > 0) {
+ element.children.forEach((child) => flatten(child));
+ } else {
+ // 鍏嬮殕鍏冪礌浠ラ伩鍏嶄慨鏀瑰師濮嬫暟鎹�
+ let item = JSON.parse(JSON.stringify(element));
+ result.push(item); // 灏嗘渶搴曞眰鐨勫厓绱犳坊鍔犲埌缁撴灉鏁扮粍
+ }
+ }
+
+ // 浠庨《灞傚厓绱犲紑濮嬮�掑綊
+ multiArray.forEach((element) => flatten(element));
+ return result; // 杩斿洖鍙寘鍚渶搴曞眰鍏冪礌鐨勪竴缁存暟缁�
},
submitForm(formName) {
this.$modal.loading("姝e湪淇淇濆瓨鏁版嵁锛岃绋嶅��...");
@@ -1560,6 +1860,25 @@
if (!this.ruleForm.categoryid) {
this.ruleForm.categoryid = -1;
}
+ // 棰樼洰淇濆瓨澶勭悊
+ // 鎻愪氦
+ this.ruleForm.svyTemplateLibScripts.forEach((res) => {
+ if (!res.isoperation) {
+ res.isoperation = 2;
+ }
+ res.ivrLibaScriptTargetoptionList = res.svyLibTemplateTargetoptions.map(
+ (item) => {
+ if (!item.isoperation) {
+ item.isoperation = 2;
+ item.templateID = this.ruleForm.id;
+ }
+ return item;
+ }
+ );
+ });
+ this.delScriptVOList.forEach((item) => {
+ this.ruleForm.svyTemplateLibScripts.push(item);
+ });
if (this.id) {
this.ruleForm.isoperation = 2;
this.ruleForm.tempDetpRelevances = null;
@@ -1569,6 +1888,7 @@
this.putbelongDepts();
this.$modal.closeLoading();
this.$router.go(-1);
+ // window.location.reload();
});
} else {
this.ruleForm.isoperation = 1;
@@ -1585,11 +1905,46 @@
});
}
},
+ // 棰樼洰鏍¢獙
+ toExamine() {
+ // 閬嶅巻棰樼洰闆嗗悎
+ for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) {
+ const question = this.ruleForm.svyTemplateLibScripts[i];
+
+ // 濡傛灉 scriptType 涓� 4锛屽垯璺宠繃褰撳墠棰樼洰
+ if (question.scriptType === 4) {
+ continue;
+ }
+ // 鑾峰彇褰撳墠棰樼洰鐨勯�夐」闆嗗悎
+ const options = question.svyLibTemplateTargetoptions;
+
+ // 鍒涘缓涓�涓� Set 鏉ュ瓨鍌ㄩ�夐」鍚嶇О锛岀敤浜庢娴嬮噸澶�
+ const optionNames = new Set();
+
+ // 閬嶅巻閫夐」闆嗗悎
+ for (let j = 0; j < options.length; j++) {
+ const option = options[j];
+ const optionContent = option.optioncontent;
+
+ // 濡傛灉閫夐」鍚嶇О宸茬粡瀛樺湪浜� Set 涓紝璇存槑閲嶅
+ if (optionNames.has(optionContent)) {
+ this.$message.error(
+ `棰樼洰 ${question.id} 鐨勯�夐」鍚嶇О "${optionContent}" 閲嶅`
+ );
+ return false; // 杩斿洖 false 琛ㄧず鏍¢獙澶辫触
+ }
+ // 灏嗛�夐」鍚嶇О娣诲姞鍒� Set 涓�
+ optionNames.add(optionContent);
+ }
+ }
+
+ // 濡傛灉鎵�鏈夐鐩兘鏍¢獙閫氳繃锛岃繑鍥� true
+ console.log("鎵�鏈夐鐩牎楠岄�氳繃锛岄�夐」鍚嶇О鏃犻噸澶�");
+ this.Departmenttreatment();
+ },
+
// 绉戝/闄㈠尯澶勭悊
Departmenttreatment() {
- console.log(this.tempDetpRelevanceslist, "tempDetpRelevanceslist");
- console.log(this.deptlist, "deptlist");
- console.log(this.hosplist, "deptlist");
this.tempDetpRelevanceslist.forEach((item) => {
console.log(item);
let result = this.deptlist.some((obj) => obj.deptCode == item);
@@ -1607,9 +1962,6 @@
});
this.tempbelongWards.forEach((item) => {
let result = this.hosplist.some((obj) => obj.deptCode == item);
-
- console.log(this.result, "resulthhh");
-
if (!result) {
this.tempbelongWardsform.push({
deptType: 2,
@@ -1620,11 +1972,6 @@
});
}
});
- console.log(this.tempbelongWardsform, "tempbelongWardsform");
- console.log(
- this.tempDetpRelevanceslistform,
- "tempDetpRelevanceslistform"
- );
// return
setTimeout(() => {
@@ -1649,13 +1996,69 @@
let result = this.hosplist
.filter((item) => item.deptCode == row)
.map((item) => item.id);
- if (result.length) {
- depthospgetsondel(result).then((res) => {
- if (res.code) {
- }
- });
- }
+ if (result.length) {
+ depthospgetsondel(result).then((res) => {
+ if (res.code) {
+ }
+ });
+ }
},
+ // ---------------閫夐」浠诲姟缁戝畾
+ openServiceDialog(item) {
+ this.gettaskList();
+ this.currentOptionItem = item;
+ },
+ gettaskList() {
+ getTasklist(this.topqueryParams).then((response) => {
+ this.filteredServiceList = response.rows;
+ this.tasktotal = response.total;
+ this.serviceDialogVisible = true;
+ this.$forceUpdate();
+ this.taskloading = false;
+ });
+ },
+ handleQuery() {
+ this.topqueryParams.pageNum = 1;
+ this.gettaskList();
+ },
+ // 鏂板鏂规硶锛氬姞杞戒换鍔″垪琛�
+ loadServiceList() {
+ // 杩欓噷璋冪敤API鑾峰彇浠诲姟鍒楄〃
+ // 绀轰緥鏁版嵁锛屽疄闄呬娇鐢ㄦ椂闇�瑕佽皟鐢ㄧ浉搴旂殑API
+ this.serviceList = [
+ { id: 1, taskName: "闅忚浠诲姟1", taskType: "甯歌闅忚" },
+ { id: 2, taskName: "鍋ュ悍璇勪及浠诲姟", taskType: "鍋ュ悍璇勪及" },
+ { id: 3, taskName: "鐢ㄨ嵂鎻愰啋浠诲姟", taskType: "鐢ㄨ嵂绠$悊" },
+ ];
+ },
+
+ // 鏂板鏂规硶锛氬鐞嗕换鍔¢�夋嫨鍙樺寲
+ handleServiceSelectionChange(selection) {
+ this.selectedService = selection.length > 0 ? selection[0] : null;
+ },
+
+ // 鏂板鏂规硶锛氱‘璁ら�夋嫨浠诲姟
+ confirmServiceSelection() {
+ console.log(this.selectedService);
+ console.log(this.currentOptionItem);
+
+ if (this.selectedService && this.currentOptionItem) {
+ this.currentOptionItem.sendTaskname = this.selectedService.taskName;
+ this.currentOptionItem.sendTaskid = this.selectedService.taskid;
+ this.serviceDialogVisible = false;
+ this.serviceSearch = "";
+ this.selectedService = null;
+ } else {
+ this.$message.warning("璇烽�夋嫨涓�涓换鍔�");
+ }
+ },
+
+ // 鏂板鏂规硶锛氱Щ闄ゅ叧鑱旀湇鍔�
+ removeService(item) {
+ item.sendTaskname = "";
+ item.sendTaskid = "";
+ },
+ // ------------------------
// 涓嬩竴姝�
nextstep() {
if (this.Editprogress <= 2) {
@@ -1686,7 +2089,7 @@
// 鑾峰彇闂鍒楄〃
getaddtopiclist() {
this.drawer = true;
- this.queryParams.scoretype = this.ruleForm.scoreType;
+ this.queryParams.scoreType = this.ruleForm.scoreType;
getissuelist(this.queryParams).then((res) => {
this.loading = false;
this.userList = res.rows;
@@ -1696,7 +2099,9 @@
},
// 鏂板闂
addtopic(row) {
+ console.log(row);
row.isoperation = 1;
+ row.scriptid = row.id;
row.svyLibScriptOptions.forEach((item) => {
item.isoperation = 1;
});
@@ -1760,14 +2165,19 @@
'鏄惁纭鏂板鍚嶇О涓�"' + this.indexform.scriptTopic + '"鐨勯棶棰樻暟鎹紵'
)
.then(() => {
+ // 鉁� 寮哄埗鍒濆鍖�
+ if (!Array.isArray(this.indexform.svyLibTemplateTargetoptions)) {
+ this.$set(this.indexform, "svyLibTemplateTargetoptions", []);
+ }
+
this.indexform.isoperation = 1;
this.indexform.svyLibTemplateTargetoptions.forEach((item) => {
item.isoperation = 1;
});
+
this.ruleForm.svyTemplateLibScripts.push(this.indexform);
this.indexform = { svyTemplateLibScripts: [] };
this.drawer = false;
-
this.sortFn();
this.$modal.msgSuccess("闂鏂板鎴愬姛锛屼繚瀛樻ā鏉垮け鏁�");
});
@@ -1875,6 +2285,12 @@
},
// 淇濆瓨绉戝/鐥呭尯
putbelongDepts(id) {
+ this.tempDetpRelevanceslistform.forEach((item) => {
+ if (!item.tempid) item.tempid = id;
+ });
+ this.tempbelongWardsform.forEach((item) => {
+ if (!item.tempid) item.tempid = id;
+ });
if (this.tempDetpRelevanceslistform.length > 0) {
depthospgetson(this.tempDetpRelevanceslistform).then((res) => {
if (res.code == 200) {
@@ -2153,14 +2569,22 @@
// ---------------------------------------------------------
// 鏂伴棶棰樻柊澧�
addoption() {
- if (!this.indexform.svyLibTemplateTargetoptions) {
- this.indexform.svyLibTemplateTargetoptions = [];
+ if (!Array.isArray(this.indexform.svyLibTemplateTargetoptions)) {
+ this.$set(this.indexform, "svyLibTemplateTargetoptions", []);
}
+
this.indexform.svyLibTemplateTargetoptions.push({
+ tempId: Date.now() + Math.random(),
+ optioncontent: "",
score: "",
isoperation: 1,
});
- console.log(this.indexform.svyLibTemplateTargetoptions);
+ },
+ deletexuanx(item) {
+ this.indexform.svyLibTemplateTargetoptions =
+ this.indexform.svyLibTemplateTargetoptions.filter(
+ (opt) => opt.tempId !== item.tempId
+ );
},
// 閫夐」鏂囦欢涓婁紶
handleChange(item, response, file, fileList) {
@@ -2191,9 +2615,16 @@
</script>
<style lang="scss" scoped>
+$radius: 8px;
+$border: #e4e7ed;
+$bg-light: #f7f9fb;
+$primary: #409eff;
+$text-main: #303133;
+$text-sub: #606266;
.Questionnairemanagement {
// display: flex;
}
+
.sidecolumn {
margin: 10px 20px 0 20px;
padding: 20px;
@@ -2202,6 +2633,7 @@
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
}
+
.leftvlue {
// // display: flex;
// // flex: 1;
@@ -2215,20 +2647,25 @@
border: 1px solid #dcdfe6;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
+
.mulsz {
font-size: 20px;
}
+
.leftvlue-jbxx {
- display: flex; /* 浣跨敤 Flexbox 甯冨眬 */
+ display: flex;
+ /* 浣跨敤 Flexbox 甯冨眬 */
justify-content: space-between;
font-size: 24px;
border-left: 5px solid #41a1be;
padding-left: 5px;
margin: 15px 0;
}
+
.demo-cascader {
margin-right: 20px;
}
+
.PreviewTemplate {
color: #02a7f0;
cursor: pointer;
@@ -2236,6 +2673,7 @@
margin: 0 20px;
}
}
+
.preview-left {
margin: 20px;
// margin: 20px;
@@ -2244,14 +2682,17 @@
border: 1px solid #dcdfe6;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
+
.scriptTopic-dev {
margin-bottom: 25px;
font-size: 20px !important;
+
.dev-text {
margin-bottom: 10px;
}
}
}
+
.headline {
display: flex;
justify-content: space-between;
@@ -2260,6 +2701,7 @@
padding-left: 5px;
margin: 15px 0;
}
+
.xinz-inf {
font-size: 18px;
white-space: nowrap;
@@ -2271,6 +2713,7 @@
.el-tag + .el-tag {
margin-left: 10px;
}
+
.button-new-tag {
margin-left: 10px;
height: 32px;
@@ -2278,12 +2721,14 @@
padding-top: 0;
padding-bottom: 0;
}
+
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
}
+
.xinz-infs {
font-size: 18px;
line-height: 48px;
@@ -2292,51 +2737,123 @@
margin-left: 10px;
}
}
+
.addtopic {
margin-top: 30px;
}
+
.presentation {
margin: 20px 0;
display: flex;
+
.presentation-left {
width: 45%;
- // height: 500px;
- .button-textxg {
- color: #024df0;
- }
- .button-textsc {
- color: #f52727;
- }
- }
- .spresentation-left {
- width: 100%;
- // height: 500px;
- .button-textxg {
- color: #024df0;
- }
- .button-textsc {
- color: #f52727;
- }
- }
- .presentation-right {
- width: 55%;
- max-height: 688px;
+ max-height: 80vh;
padding: 0 20px;
font-size: 18px;
overflow: auto;
+
+ .button-textxg {
+ color: #024df0;
+ }
+
+ .button-textsc {
+ color: #f52727;
+ }
+ }
+
+ .spresentation-left {
+ width: 100%;
+
+ // height: 500px;
+ .button-textxg {
+ color: #024df0;
+ }
+
+ .button-textsc {
+ color: #f52727;
+ }
+ }
+
+ .presentation-right {
+ flex: 6;
+ min-width: 360px;
+ max-height: 80vh;
+ overflow: auto;
+ padding: 20px;
+
.headline {
- font-size: 20px;
- border-left: 3px solid #41a1be;
- padding-left: 5px;
- margin: 15px 0;
- }
- .topicxq {
- background-color: #e2f5fc;
- border-radius: 4px;
- margin-top: 10px;
+ font-size: 18px;
+ font-weight: 600;
+ color: $text-main;
padding-left: 10px;
- padding-top: 15px;
+ border-left: 4px solid $primary;
+ margin-bottom: 16px;
}
+
+ .topic-card {
+ background: #fff;
+ border: 1px solid $border;
+ border-radius: $radius;
+ padding: 20px;
+ margin-bottom: 16px;
+ transition: box-shadow 0.2s;
+
+ &:hover {
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
+ }
+
+ .el-form-item {
+ margin-bottom: 16px;
+ }
+
+ .el-form-item__label {
+ font-size: 14px;
+ color: $text-sub;
+ }
+ }
+ }
+}
+.demo-drawer {
+ .preview-left {
+ padding: 20px;
+
+ .headline {
+ font-size: 18px;
+ font-weight: 600;
+ margin-bottom: 12px;
+ }
+
+ .topic-card {
+ background: #fff;
+ border: 1px solid $border;
+ border-radius: $radius;
+ padding: 16px;
+ margin-bottom: 12px;
+
+ .el-form-item {
+ margin-bottom: 14px;
+ }
+
+ .el-button--primary {
+ background: $primary;
+ border-radius: 20px;
+ padding: 8px 16px;
+ }
+ }
+ }
+}
+.addoption-btn {
+ width: 100%;
+ border: 1px dashed $border;
+ color: $text-sub;
+ background: $bg-light;
+ border-radius: $radius;
+ height: 40px;
+
+ &:hover {
+ border-color: $primary;
+ color: $primary;
}
}
.topicxq {
@@ -2350,9 +2867,143 @@
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
}
-.custom-width {
- width: 100px; /* 璁剧疆瀹藉害鏍峰紡 */
+
+.service-tag-container {
+ display: inline-block;
+
+ .service-tag {
+ margin-right: 10px;
+ max-width: 220px;
+ height: 32px;
+ line-height: 30px;
+ padding: 0 12px;
+ border-radius: 16px;
+ font-size: 14px;
+ font-weight: 500;
+ border: 1px solid #e1f3d8;
+ background: linear-gradient(135deg, #f0f9eb, #e1f3d8);
+ box-shadow: 0 2px 4px rgba(103, 194, 58, 0.1);
+ transition: all 0.3s ease;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ position: relative;
+
+ &:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 8px rgba(103, 194, 58, 0.15);
+ border-color: #b3e19d;
+ }
+
+ .service-icon {
+ margin-right: 4px;
+ font-size: 12px;
+ }
+
+ ::v-deep .el-icon-close {
+ margin-left: 6px;
+ font-size: 12px;
+ color: #67c23a;
+ background-color: #f0f9eb;
+ border-radius: 50%;
+ width: 16px;
+ height: 16px;
+ line-height: 16px;
+
+ &:hover {
+ background-color: #67c23a;
+ color: white;
+ }
+ }
+ }
}
+
+.service-add-btn {
+ display: inline-block;
+
+ .add-service-btn {
+ height: 32px;
+ padding: 0 16px;
+ border-radius: 16px;
+ font-size: 14px;
+ font-weight: 500;
+ background: linear-gradient(135deg, #67c23a, #85ce61);
+ border: none;
+ box-shadow: 0 2px 4px rgba(103, 194, 58, 0.2);
+ transition: all 0.3s ease;
+
+ &:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 8px rgba(103, 194, 58, 0.3);
+ background: linear-gradient(135deg, #5daf34, #7ac252);
+ }
+
+ &:active {
+ transform: translateY(0);
+ box-shadow: 0 2px 4px rgba(103, 194, 58, 0.2);
+ }
+
+ i {
+ margin-right: 4px;
+ font-size: 12px;
+ }
+ }
+}
+
+// 鍝嶅簲寮忚璁�
+@media (max-width: 768px) {
+ .service-tag-container .service-tag {
+ max-width: 180px;
+ font-size: 13px;
+ padding: 0 10px;
+ }
+
+ .service-add-btn .add-service-btn {
+ padding: 0 12px;
+ font-size: 13px;
+ }
+}
+
+// 娣诲姞鍔ㄧ敾鏁堟灉
+@keyframes tagFadeIn {
+ from {
+ opacity: 0;
+ transform: scale(0.8) translateY(-5px);
+ }
+
+ to {
+ opacity: 1;
+ transform: scale(1) translateY(0);
+ }
+}
+
+.service-tag {
+ animation: tagFadeIn 0.3s ease-out;
+}
+
+// 涓烘暣涓�夐」鍖哄煙娣诲姞缁熶竴鏍峰紡
+.topicxq {
+ .service-tag-container,
+ .service-add-btn {
+ margin: 8px 0;
+ }
+}
+
+// 纭繚鍦ㄨ〃鍗曚腑鐨勬纭竷灞�
+.el-form-item {
+ .el-form-item__content {
+ .service-tag-container,
+ .service-add-btn {
+ vertical-align: middle;
+ }
+ }
+}
+
+.custom-width {
+ width: 100px;
+ /* 璁剧疆瀹藉害鏍峰紡 */
+}
+
.el-select {
width: 280px;
}
@@ -2360,6 +3011,7 @@
.el-cascader {
width: 40%;
}
+
::v-deep .addtopic-input {
input {
background: #02a7f0;
@@ -2367,25 +3019,31 @@
width: 150px;
}
}
+
::v-deep.el-step.is-vertical .el-step__title {
font-size: 25px;
}
+
::v-deep.el-input--medium {
font-size: 18px !important;
}
+
::v-deep.ruleFormaa.el-select {
display: inline-block;
position: relative;
width: 700px;
}
+
.el-select__tags {
font-size: 20px;
max-width: 888px !important;
}
+
::v-deep.el-radio__inner {
width: 22px;
height: 22px;
}
+
// ::v-deep.scriptTopic-dev.el-radio__label {
// font-size: 24px;
// }
@@ -2394,11 +3052,13 @@
font-size: 24px;
}
}
+
::v-deep.el-checkbox-group {
span {
font-size: 24px;
}
}
+
// ::v-deep.el-form-item--medium .el-form-item__content {
// line-height: 36px;
// display: flex;
--
Gitblit v1.9.3