From 2736806c9fbccb6e3fdf981a6f48a9343e21fa4a Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 19 八月 2026 15:33:10 +0800
Subject: [PATCH] 提交
---
随访通用8.18.zip | 0
src/views/complaint/complaintmy/index.vue | 1054 ++++++++----------------------------
src/views/followvisit/again/index.vue | 2
src/views/followvisit/record/detailpage/index.vue | 225 ++++---
src/views/followvisit/record/detailpage/components/AdviceList.vue | 362 ++++++------
随访外链.zip | 0
6 files changed, 554 insertions(+), 1,089 deletions(-)
diff --git a/src/views/complaint/complaintmy/index.vue b/src/views/complaint/complaintmy/index.vue
index c8e61c2..7295a41 100644
--- a/src/views/complaint/complaintmy/index.vue
+++ b/src/views/complaint/complaintmy/index.vue
@@ -1,877 +1,323 @@
<template>
<div class="app-container">
- <el-row :gutter="20">
- <!--鐢ㄦ埛鏁版嵁-->
- <el-col :span="24" :xs="24">
- <el-form
- :model="topqueryParams"
- ref="queryForm"
- size="small"
- :inline="true"
- v-show="showSearch"
- label-width="98px"
- >
- <el-form-item label="鎶曡瘔绫诲瀷" prop="status">
- <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鎶曡瘔鐘舵��" prop="status">
- <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :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"
- >鎼滅储</el-button
- >
- <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
- >閲嶇疆</el-button
- >
- </el-form-item>
- </el-form>
- <el-divider></el-divider>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-plus"
- size="medium"
- @click="handleAdd"
- v-hasPermi="['system:user:add']"
- >鏂板</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="medium"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['system:user:edit']"
- >淇敼</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="medium"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['system:user:remove']"
- >鍒犻櫎</el-button
- >
- </el-col>
- <el-col :span="19">
- <div class="documentf">
- <div class="document">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="medium"
- @click="handleExport"
- v-hasPermi="['system:user:export']"
- >瀵煎嚭</el-button
- >
- </div>
- </div>
- </el-col>
- <!-- <el-col :span="1.5"> </el-col> -->
- </el-row>
- <!-- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- :columns="columns"
- ></right-toolbar> -->
- <el-table
- v-loading="loading"
- :data="userList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="50" align="center" />
- <el-table-column
- label="搴忓彿"
- align="center"
- key="userId"
- prop="userId"
- />
+ <!-- 鎼滅储鏍� -->
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="70px">
+ <el-form-item label="寤鸿绫诲瀷" prop="adviceType">
+ <el-select v-model="queryParams.adviceType" placeholder="鍏ㄩ儴绫诲瀷" clearable style="width: 130px">
+ <el-option label="鎶曡瘔" value="1" />
+ <el-option label="寤鸿" value="2" />
+ <el-option label="琛ㄦ壃" value="3" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍐呭" prop="content">
+ <el-input v-model="queryParams.content" placeholder="璇疯緭鍏ュ唴瀹瑰叧閿瓧" clearable style="width: 180px" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+ <el-form-item label="鍒涘缓鑰�" prop="createBy">
+ <el-input v-model="queryParams.createBy" placeholder="璇疯緭鍏ュ垱寤鸿��" clearable style="width: 140px" @keyup.enter.native="handleQuery" />
+ </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-form-item>
+ </el-form>
- <el-table-column
- label="鐥呬汉濮撳悕"
- align="center"
- sortable
- key="userName"
- prop="userName"
- width="100"
- :show-overflow-tooltip="true"
- />
- <el-table-column
- label="鎵嬫満鍙�"
- align="center"
- key="types"
- prop="types"
- />
- <el-table-column
- label="鎬у埆"width="100"
- align="center"
- key="nickName"
- prop="nickName"
- />
- <el-table-column
- label="鎶曡瘔鏂瑰紡"
- align="center"
- key="phonenumber"
- prop="phonenumber"
- width="120"
- />
-
- <el-table-column
- label="鎶曡瘔瀵硅薄"
- align="center"
- key="topicnumber"
- prop="topicnumber"
- width="120"
- :show-overflow-tooltip="true"
- />
- <el-table-column
- label="绾у埆"
- align="center"
- key="topicnumberaa"
- prop="topicnumberaa"
- sortable
- width="120"
- :show-overflow-tooltip="true"
- />
-
- <el-table-column
- label="鎶曡瘔鏃ユ湡"
- sortable
- align="center"
- prop="createTime"
- width="160"
- >
- <template slot-scope="scope">
- <span>{{ formatTime(scope.row.createTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- align="center"
- width="160"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['system:user:edit']"
- >淇敼</el-button
- >
- </template>
- </el-table-column>
- </el-table>
-
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="topqueryParams.pageNum"
- :limit.sync="topqueryParams.pageSize"
- @pagination="getList"
- />
+ <!-- 鎿嶄綔鏍� -->
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">鏂板</el-button>
</el-col>
+ <el-col :span="1.5">
+ <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">鍒犻櫎</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
+ </el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
</el-row>
- <!-- 娣诲姞鎴栦慨鏀规姇璇夊璇濇 -->
- <el-dialog
- :title="title"
- :visible.sync="addalteropen"
- width="900px"
- append-to-body
- >
- <el-form ref="form" :model="form" label-width="80px">
+
+ <!-- 琛ㄦ牸 -->
+ <el-table v-loading="loading" :data="adviceList" @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="50" align="center" />
+ <el-table-column label="寤鸿绫诲瀷" align="center" prop="adviceType" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="adviceTypeTag(scope.row.adviceType)" size="small">{{ adviceTypeText(scope.row.adviceType) }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍐呭" align="center" prop="content" min-width="200" :show-overflow-tooltip="true" />
+ <el-table-column label="娑夊強绉戝" align="center" prop="deptCodes" width="140" :show-overflow-tooltip="true">
+ <template slot-scope="scope">{{ getDeptNames(scope.row.deptCodes) }}</template>
+ </el-table-column>
+ <el-table-column label="娑夊強鐥呭尯" align="center" prop="wardCodes" width="140" :show-overflow-tooltip="true">
+ <template slot-scope="scope">{{ getWardNames(scope.row.wardCodes) }}</template>
+ </el-table-column>
+ <el-table-column label="娑夊強浜哄憳" align="center" prop="involvedUsers" width="120" :show-overflow-tooltip="true" />
+ <el-table-column label="澶囨敞" align="center" prop="remark" min-width="140" :show-overflow-tooltip="true" />
+ <el-table-column label="鍒涘缓鑰�" align="center" prop="createBy" width="100" />
+ <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="160" />
+ <el-table-column label="鎿嶄綔" align="center" width="120" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">淇敼</el-button>
+ <el-button size="mini" type="text" icon="el-icon-delete" style="color: #f56c6c" @click="handleDelete(scope.row)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+
+ <!-- 鏂板/缂栬緫寮圭獥 -->
+ <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-form-item label="寤鸿绫诲瀷" prop="adviceType">
+ <el-radio-group v-model="form.adviceType">
+ <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-row :gutter="20">
- <el-col :span="12"
- ><el-form-item label="鐥呬汉濮撳悕">
- <el-input v-model="form.name"></el-input> </el-form-item
- ></el-col>
- <el-col :span="12"
- ><el-form-item label="鎬у埆"width="100">
- <el-radio v-model="form.radio" label="1">鐢�</el-radio>
- <el-radio v-model="form.radio" label="2">濂�</el-radio>
- <el-radio v-model="form.radio" label="3">鏈煡</el-radio>
- </el-form-item></el-col
- >
- </el-row>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="鑱旂郴鐢佃瘽">
- <div style="margin-top: 15px">
- <el-input
- placeholder="璇疯緭鍏ユ墜鏈哄彿"
- v-model="form.telcode"
- class="input-with-select"
- >
- <el-button slot="append" icon="el-icon-search"></el-button>
- </el-input>
- </div>
+ <el-col :span="12">
+ <el-form-item label="浠诲姟ID" prop="subid">
+ <el-input v-model="form.subid" placeholder="浠诲姟ID" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鏈嶅姟ID" prop="taskid">
+ <el-input v-model="form.taskid" placeholder="鏈嶅姟ID" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鎶曡瘔绫诲瀷">
- <el-select v-model="form.region" placeholder="璇烽�夋嫨娲诲姩鍖哄煙">
- <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
- <el-option label="鍖哄煙浜�" value="beijing"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鎶曡瘔鏃ユ湡">
- <el-date-picker
- v-model="form.value2"
- align="right"
- type="date"
- placeholder="閫夋嫨鏃ユ湡"
- :picker-options="pickerOptions"
- >
- </el-date-picker>
+ <el-form-item label="鐥呬汉ID" prop="patid">
+ <el-input v-model="form.patid" placeholder="鐥呬汉ID" />
</el-form-item>
</el-col>
</el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鎶曡瘔绾у埆">
- <el-select v-model="form.region" placeholder="璇烽�夋嫨娲诲姩鍖哄煙">
- <el-option label="涓�绾�" value="shanghai"></el-option>
- <el-option label="浜岀骇" value="beijing"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12"
- ><el-form-item label="闂ㄨ瘖鏃ユ湡">
- <el-date-picker
- v-model="form.value2"
- align="right"
- type="date"
- placeholder="閫夋嫨鏃ユ湡"
- :picker-options="pickerOptions"
- >
- </el-date-picker> </el-form-item
- ></el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鎶曡瘔瀵硅薄鎼滅储">
- <el-select
- v-model="value"
- multiple
- filterable
- remote
- reserve-keyword
- placeholder="璇疯緭鍏ュ叧閿瘝"
- :remote-method="remoteMethod"
- :loading="loading"
- >
- <el-option
- v-for="item in options"
- :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="鎶曡瘔瀵硅薄鏄剧ず">
- <div>{{ form.name }}</div>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鎶曡瘔鎻忚堪">
- <el-input type="textarea" v-model="form.desc"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鎶曡瘔瑕佹眰">
- <el-input type="textarea" v-model="form.desc"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-form-item label="娑夊強绉戝" prop="deptCodes">
+ <el-select v-model="form.deptCodes" multiple filterable clearable placeholder="璇烽�夋嫨娑夊強绉戝锛堝彲澶氶�夛級" style="width: 100%">
+ <el-option v-for="d in deptOptions" :key="d.value" :label="d.label" :value="d.value" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="娑夊強鐥呭尯" prop="wardCodes">
+ <el-select v-model="form.wardCodes" multiple filterable clearable placeholder="璇烽�夋嫨娑夊強鐥呭尯锛堝彲澶氶�夛級" style="width: 100%">
+ <el-option v-for="w in wardOptions" :key="w.value" :label="w.label" :value="w.value" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="娑夊強浜哄憳" prop="involvedUsers">
+ <el-input v-model="form.involvedUsers" placeholder="娑夊強浜哄憳浠g爜锛屽涓敤閫楀彿鍒嗛殧" />
+ </el-form-item>
+ <el-form-item label="鍐呭" prop="content">
+ <el-input type="textarea" :rows="4" v-model="form.content" placeholder="璇疯緭鍏ユ姇璇�/寤鸿/琛ㄦ壃鍐呭" />
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input type="textarea" :rows="2" v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" />
+ </el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">鎻� 浜�</el-button>
- <el-button @click="cancel">杩� 鍥�</el-button>
+ <el-button @click="open = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
-import {
- listUser,
- getUser,
- delUser,
- addUser,
- updateUser,
- resetUserPwd,
- changeUserStatus,
-} from "@/api/system/user";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listAdvice, getAdvice, addAdvice, updateAdvice, delAdvice } from "@/api/followvisit/advice";
+import store from "@/store";
export default {
- name: "User",
- dicts: ["sys_normal_disable", "sys_user_sex"],
- components: { Treeselect },
+ name: "ComplaintMy",
data() {
return {
- // 閬僵灞�
- loading: true,
- // 閫変腑鏁扮粍
- ids: [],
- // 闈炲崟涓鐢�
- single: true,
- // 闈炲涓鐢�
- multiple: true,
- // 鏄剧ず鎼滅储鏉′欢
- showSearch: true,
- // 鎬绘潯鏁�
- total: 0,
- // 鐢ㄦ埛琛ㄦ牸鏁版嵁
- userList: null,
- // 寮瑰嚭灞傛爣棰�
- title: "鏂板鎶曡瘔",
- // 鏄惁鏄剧ず淇敼銆佹坊鍔犲脊鍑哄眰
- addalteropen: false,
- // 閮ㄩ棬鍚嶇О
- deptName: undefined,
- // 榛樿瀵嗙爜
- initPassword: undefined,
- // 鏃ユ湡鑼冨洿
- dateRange: [],
- // 宀椾綅閫夐」
- postOptions: [],
- // 瑙掕壊閫夐」
- roleOptions: [],
- dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
- inputVisible: false,
- inputValue: "",
- previewVisible: false, //鎶曡瘔棰勮寮规
- radio: "",
- radios: [],
- previewtype: 2, //棰勮鎶曡瘔绫诲瀷
- total: 0, // 鎬绘潯鏁�
- ImportQuantity: 999, //瀵兼姇璇夋暟閲�
- //棰勮鎶曡瘔淇℃伅
- previewvalue: {
- username: "杩欎釜鍖荤敓瀵逛綘鎬庝箞鏍�",
- },
- value: [],
- list: [],
loading: false,
- states: [
- "Alabama",
- "Alaska",
- "Arizona",
- "Arkansas",
- "California",
- "Colorado",
- "Connecticut",
- "Delaware",
- "Florida",
- "Georgia",
- "Hawaii",
- "Idaho",
- "Illinois",
- "Indiana",
- "Iowa",
- "Kansas",
- "Kentucky",
- "Louisiana",
- "Maine",
- "Maryland",
- "Massachusetts",
- "Michigan",
- "Minnesota",
- "Mississippi",
- "Missouri",
- "Montana",
- "Nebraska",
- "Nevada",
- "New Hampshire",
- "New Jersey",
- "New Mexico",
- "New York",
- "North Carolina",
- "North Dakota",
- "Ohio",
- "Oklahoma",
- "Oregon",
- "Pennsylvania",
- "Rhode Island",
- "South Carolina",
- "South Dakota",
- "Tennessee",
- "Texas",
- "Utah",
- "Vermont",
- "Virginia",
- "Washington",
- "West Virginia",
- "Wisconsin",
- "Wyoming",
- ],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- shortcuts: [
- {
- text: "浠婂ぉ",
- onClick(picker) {
- picker.$emit("pick", new Date());
- },
- },
- {
- text: "鏄ㄥぉ",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24);
- picker.$emit("pick", date);
- },
- },
- {
- text: "涓�鍛ㄥ墠",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit("pick", date);
- },
- },
- ],
- },
- // 琛ㄥ崟鍙傛暟
- form: {
- phonenumber: "",
- totagid: "",
- types: "",
- nickName: "",
- qystatus: "",
- btstatus: "",
- },
- //瀵煎叆杩涘害
- dractive: 1,
- // 瀵煎叆灞曠ず琛ㄥ崟
- uploadingData: {},
- // 鏌ヨ鍙傛暟
- topqueryParams: {
+ adviceList: [],
+ total: 0,
+ ids: [],
+ single: true,
+ multiple: true,
+ showSearch: true,
+ title: "",
+ open: false,
+ queryParams: {
pageNum: 1,
pageSize: 10,
- userName: undefined,
- tagid: undefined,
- topic: undefined,
+ adviceType: undefined,
+ content: undefined,
+ createBy: undefined
},
- propss: { multiple: true },
- options: [],
-
- topicoptions: [
- {
- value: 1,
- label: "鍗曢��",
- },
- {
- value: 2,
- label: "澶氶��",
- },
- {
- value: 3,
- label: "濉┖",
- },
- ],
- // 琛ㄥ崟鏍¢獙
+ form: {},
rules: {
- userName: [
- { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
- {
- min: 2,
- max: 20,
- message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
- trigger: "blur",
- },
- ],
- nickName: [
- { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" },
- ],
- password: [
- { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
- {
- min: 5,
- max: 20,
- message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
- trigger: "blur",
- },
- ],
- email: [
- {
- type: "email",
- message: "璇疯緭鍏ユ纭殑閭鍦板潃",
- trigger: ["blur", "change"],
- },
- ],
- phonenumber: [
- {
- pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
- message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
- trigger: "blur",
- },
- ],
- IDnumber: [
- {
- pattern:
- /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
- message: "璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�",
- trigger: "blur",
- },
- ],
- },
+ adviceType: [{ required: true, message: "璇烽�夋嫨寤鸿绫诲瀷", trigger: "change" }],
+ content: [{ required: true, message: "璇疯緭鍏ュ唴瀹�", trigger: "blur" }]
+ }
};
},
- watch: {},
+ computed: {
+ deptOptions() {
+ return (store.getters.belongDepts || []).map(d => ({ label: d.deptName, value: d.deptCode }));
+ },
+ wardOptions() {
+ return (store.getters.belongWards || []).map(w => ({ label: w.districtName, value: w.districtCode }));
+ }
+ },
created() {
this.getList();
- this.getConfigKey("sys.user.initPassword").then((response) => {
- this.initPassword = response.msg;
- });
- },
- // 鎼滅储
- mounted() {
- this.list = this.states.map((item) => {
- return { value: `value:${item}`, label: `label:${item}` };
- });
},
methods: {
- /** 鏌ヨ鎶曡瘔鍒楄〃 */
+ adviceTypeText(t) {
+ const map = { "1": "鎶曡瘔", "2": "寤鸿", "3": "琛ㄦ壃" };
+ return map[t] || "鏈煡";
+ },
+ adviceTypeTag(t) {
+ const map = { "1": "danger", "2": "primary", "3": "success" };
+ return map[t] || "info";
+ },
+ getDeptNames(codes) {
+ if (!codes) return "-";
+ return codes.split(",").filter(Boolean).map(c => {
+ const found = this.deptOptions.find(d => d.value == c);
+ return found ? found.label : c;
+ }).join("銆�") || "-";
+ },
+ getWardNames(codes) {
+ if (!codes) return "-";
+ return codes.split(",").filter(Boolean).map(c => {
+ const found = this.wardOptions.find(w => w.value == c);
+ return found ? found.label : c;
+ }).join("銆�") || "-";
+ },
+
getList() {
this.loading = true;
- listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then(
- (response) => {
- this.userList = response.rows;
- this.total = response.total;
- this.loading = false;
- }
- );
- },
- // 鏌ョ湅鎶曡瘔璇︽儏
- Referencequestion(row) {
- this.previewVisible = true;
- },
- // 娣诲姞寮规鎼滅储
- remoteMethod(query) {
- if (query !== "") {
- this.loading = true;
- setTimeout(() => {
- this.loading = false;
- this.options = this.list.filter((item) => {
- return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
- });
- }, 200);
- } else {
- this.options = [];
- }
- },
- // 鎶曡瘔鐘舵�佷慨鏀�
- handleStatusChange(row) {
- let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
- this.$modal
- .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
- .then(function () {
- return changeUserStatus(row.userId, row.status);
- })
- .then(() => {
- this.$modal.msgSuccess(text + "鎴愬姛");
- })
- .catch(function () {
- row.status = row.status === "0" ? "1" : "0";
- });
- },
- // 鍙栨秷鎸夐挳
- cancel() {
- this.addalteropen = false;
- this.reset();
- },
- // 琛ㄥ崟閲嶇疆
- reset() {
- this.form = {
- userId: undefined,
- deptId: undefined,
- userName: undefined,
- nickName: undefined,
- password: undefined,
- phonenumber: undefined,
- email: undefined,
- sex: undefined,
- status: "0",
- remark: undefined,
- postIds: [],
- roleIds: [],
+ const body = {
+ adviceType: this.queryParams.adviceType || undefined,
+ content: this.queryParams.content || undefined,
+ createBy: this.queryParams.createBy || undefined
};
- this.resetForm("form");
+ const query = {
+ pageNum: this.queryParams.pageNum,
+ pageSize: this.queryParams.pageSize
+ };
+ listAdvice(body, query).then(res => {
+ this.adviceList = res.rows || [];
+ this.total = res.total || 0;
+ this.loading = false;
+ }).catch(() => { this.loading = false; });
},
- /** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
- this.topqueryParams.pageNum = 1;
+ this.queryParams.pageNum = 1;
this.getList();
},
- /** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
- this.dateRange = [];
- this.resetForm("queryForm");
- this.topqueryParams.deptId = undefined;
- this.$refs.tree.setCurrentKey(null);
+ this.queryParams.adviceType = undefined;
+ this.queryParams.content = undefined;
+ this.queryParams.createBy = undefined;
this.handleQuery();
},
- // 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.userId);
- this.single = selection.length != 1;
+ this.ids = selection.map(item => item.id);
+ this.single = selection.length !== 1;
this.multiple = !selection.length;
},
- //鍒犻櫎閫夐」
- handleClose(tag) {
- this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ reset() {
+ this.form = {
+ id: undefined,
+ subid: undefined,
+ taskid: undefined,
+ patid: undefined,
+ adviceType: "1",
+ deptCodes: [],
+ wardCodes: [],
+ involvedUsers: "",
+ content: "",
+ remark: ""
+ };
},
- //瑙﹀彂鏂板杈撳叆
- showInput() {
- this.inputVisible = true;
- this.$nextTick((_) => {
- this.$refs.saveTagInput.$refs.input.focus();
- });
- },
- //鑾峰彇澶卞幓鐒︾偣瑙﹀彂
- handleInputConfirm() {
- let inputValue = this.inputValue;
- if (inputValue) {
- this.dynamicTags.push(inputValue);
- }
- this.inputVisible = false;
- this.inputValue = "";
- },
- /** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset();
- this.addalteropen = true;
- // getUser().then((response) => {
- // this.postOptions = response.posts;
- // this.roleOptions = response.roles;
- // this.title = "鏂板鎶曡瘔";
- // this.form.password = this.initPassword;
- // });
+ this.title = "鏂板鎶曡瘔寤鸿";
+ this.open = true;
},
- /** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset();
- const userId = row.userId || this.ids;
- getUser(userId).then((response) => {
- this.form = response.data;
- this.postOptions = response.posts;
- this.roleOptions = response.roles;
- this.$set(this.form, "postIds", response.postIds);
- this.$set(this.form, "roleIds", response.roleIds);
- this.addalteropen = true;
- this.title = "淇敼鐢ㄦ埛";
- this.form.password = "";
+ this.title = "淇敼鎶曡瘔寤鸿";
+ getAdvice(row.id).then(res => {
+ const data = res.data || {};
+ this.form = {
+ id: data.id,
+ subid: data.subid,
+ taskid: data.taskid,
+ patid: data.patid,
+ adviceType: data.adviceType || "1",
+ deptCodes: data.deptCodes ? data.deptCodes.split(",").filter(Boolean) : [],
+ wardCodes: data.wardCodes ? data.wardCodes.split(",").filter(Boolean) : [],
+ involvedUsers: data.involvedUsers || "",
+ content: data.content || "",
+ remark: data.remark || ""
+ };
+ this.open = true;
});
},
- /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
- handleResetPwd(row) {
- this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- closeOnClickModal: false,
- inputPattern: /^.{5,20}$/,
- inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
- })
- .then(({ value }) => {
- resetUserPwd(row.userId, value).then((response) => {
- this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
- });
- })
- .catch(() => {});
- },
-
- /** 鎻愪氦鎸夐挳 */
- submitForm: function () {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.userId != undefined) {
- updateUser(this.form).then((response) => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (!valid) return;
+ const data = {
+ id: this.form.id,
+ subid: this.form.subid,
+ taskid: this.form.taskid,
+ patid: this.form.patid,
+ adviceType: this.form.adviceType,
+ deptCodes: this.form.deptCodes.join(","),
+ wardCodes: this.form.wardCodes.join(","),
+ involvedUsers: this.form.involvedUsers,
+ content: this.form.content,
+ remark: this.form.remark,
+ delFlag: "0"
+ };
+ const api = this.form.id ? updateAdvice(data) : addAdvice(data);
+ api.then(res => {
+ if (res.code === 200) {
+ this.$modal.msgSuccess(this.form.id ? "淇敼鎴愬姛" : "鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
} else {
- addUser(this.form).then((response) => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- });
+ this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
}
- }
+ });
});
},
- /** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
- const userIds = row.userId || this.ids;
- this.$modal
- .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
- .then(function () {
- return delUser(userIds);
- })
- .then(() => {
+ const ids = row.id ? [row.id] : this.ids;
+ if (!ids.length) {
+ this.$modal.msgWarning("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
+ return;
+ }
+ this.$modal.confirm("鏄惁纭鍒犻櫎鎵�閫夋姇璇夊缓璁紵").then(() => {
+ return delAdvice(ids.join(","));
+ }).then(res => {
+ if (res.code === 200) {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- })
- .catch(() => {});
+ }
+ }).catch(() => {});
},
- /** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
this.download(
- "system/user/export",
+ "/system/serviceSubtaskAdvice/export",
{
- ...this.topqueryParams,
+ adviceType: this.queryParams.adviceType,
+ content: this.queryParams.content,
+ createBy: this.queryParams.createBy
},
- `user_${new Date().getTime()}.xlsx`
+ `闅忚寤鸿鏁版嵁_${new Date().getTime()}.xlsx`
);
- },
- },
-};
-</script>
-
-<style lang="scss" scoped>
-.el-button--primary.is-plain {
- color: #ffffff;
- background: #409eff;
- border-color: #4fabe9;
-}
-
-.document {
- width: 100px;
- height: 50px;
-}
-
-.documentf {
- display: flex;
- justify-content: flex-end;
-}
-
-.download {
- text-align: center;
-
- .el-upload__tip {
- font-size: 23px;
- }
-
- .el-upload__text {
- font-size: 23px;
- }
-}
-
-.uploading {
- margin-top: 20px;
- margin: 20px;
- padding: 30px;
- background: #ffffff;
- 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);
-}
-
-.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;
-}
-
-.drexamine {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 30px;
- background: #daeaf5;
-
- img {
- width: 100px;
- height: 100px;
- }
-}
-
-.qrcode-dialo {
- // text-align: center;
- // display: flex;
- margin: 20px;
- padding: 30px;
- background: #edf1f7;
- 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);
-
- .topic-dev {
- margin-bottom: 25px;
- font-size: 20px !important;
-
- .dev-text {
- margin-bottom: 10px;
}
}
-}
-
-::v-deep.el-radio-group {
- span {
- font-size: 24px;
- }
-}
-
-::v-deep.el-checkbox-group {
- span {
- font-size: 24px;
- }
-}
-</style>
+};
+</script>
diff --git a/src/views/followvisit/again/index.vue b/src/views/followvisit/again/index.vue
index 0ebe8f4..f1190f3 100644
--- a/src/views/followvisit/again/index.vue
+++ b/src/views/followvisit/again/index.vue
@@ -1178,7 +1178,7 @@
this.topqueryParams.leavehospitaldistrictcodes[0] &&
this.topqueryParams.visitDeptCodes[0]
) {
- this.topqueryParams.deptOrDistrict = 4;
+ this.topqueryParams.deptOrDistrict = 2;
} else {
this.topqueryParams.deptOrDistrict = 1;
}
diff --git a/src/views/followvisit/record/detailpage/components/AdviceList.vue b/src/views/followvisit/record/detailpage/components/AdviceList.vue
index 5139560..2cefec9 100644
--- a/src/views/followvisit/record/detailpage/components/AdviceList.vue
+++ b/src/views/followvisit/record/detailpage/components/AdviceList.vue
@@ -1,89 +1,71 @@
<template>
- <div class="advice-list">
- <!-- 鎼滅储鏍� -->
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="70px">
- <el-form-item label="寤鸿绫诲瀷" prop="adviceType">
- <el-select v-model="queryParams.adviceType" placeholder="鍏ㄩ儴绫诲瀷" clearable style="width: 140px">
- <el-option label="鎶曡瘔" value="1" />
- <el-option label="寤鸿" value="2" />
- <el-option label="琛ㄦ壃" value="3" />
- </el-select>
- </el-form-item>
- <el-form-item label="鍐呭" prop="content">
- <el-input v-model="queryParams.content" placeholder="璇疯緭鍏ュ唴瀹瑰叧閿瓧" clearable style="width: 180px" />
- </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-form-item>
- </el-form>
+ <div class="advice-blocks">
+ <!-- 绫诲瀷 Tab 灞曠ず -->
+ <el-tabs v-model="activeType">
+ <el-tab-pane
+ v-for="type in adviceTypes"
+ :key="type.value"
+ :name="type.value"
+ >
+ <span slot="label">
+ <span class="tab-icon">{{ type.icon }}</span> {{ type.label }}
+ </span>
- <!-- 鎿嶄綔鏍� -->
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">鏂板</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">鍒犻櫎</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
- </el-col>
- </el-row>
+ <!-- 鏈夎褰� -->
+ <div v-if="getAdviceByType(type.value)" class="advice-content" :class="type.className">
+ <div class="advice-head">
+ <span class="advice-label">{{ type.label }}鍐呭</span>
+ <el-button size="mini" type="primary" plain icon="el-icon-edit" @click="handleEdit(type.value)">淇敼</el-button>
+ </div>
+ <div class="advice-text">{{ getAdviceByType(type.value).content }}</div>
+ <div class="advice-meta" v-if="getAdviceByType(type.value).deptCodes || getAdviceByType(type.value).wardCodes">
+ <span v-if="getAdviceByType(type.value).deptCodes" class="meta-item">
+ <i class="el-icon-office-building"></i>{{ getDeptNames(getAdviceByType(type.value).deptCodes) }}
+ </span>
+ <span v-if="getAdviceByType(type.value).wardCodes" class="meta-item">
+ <i class="el-icon-s-home"></i>{{ getWardNames(getAdviceByType(type.value).wardCodes) }}
+ </span>
+ </div>
+ <div class="advice-meta" v-if="getAdviceByType(type.value).involvedUsers">
+ <span class="meta-item"><i class="el-icon-user"></i>娑夊強浜哄憳锛歿{ getAdviceByType(type.value).involvedUsers }}</span>
+ </div>
+ <div class="advice-meta" v-if="getAdviceByType(type.value).remark">
+ <span class="meta-item">澶囨敞锛歿{ getAdviceByType(type.value).remark }}</span>
+ </div>
+ <div class="advice-foot">
+ <span>{{ getAdviceByType(type.value).createBy || "-" }}</span>
+ <span>{{ getAdviceByType(type.value).createTime || "-" }}</span>
+ </div>
+ </div>
- <!-- 琛ㄦ牸 -->
- <el-table v-loading="loading" :data="adviceList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="50" align="center" />
- <el-table-column label="寤鸿绫诲瀷" align="center" prop="adviceType" width="100">
- <template slot-scope="scope">
- <el-tag :type="adviceTypeTag(scope.row.adviceType)" size="small">
- {{ adviceTypeText(scope.row.adviceType) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="鍐呭" align="center" prop="content" min-width="200" :show-overflow-tooltip="true" />
- <el-table-column label="娑夊強绉戝" align="center" prop="deptCodes" width="140" :show-overflow-tooltip="true">
- <template slot-scope="scope">{{ getDeptNames(scope.row.deptCodes) }}</template>
- </el-table-column>
- <el-table-column label="娑夊強鐥呭尯" align="center" prop="wardCodes" width="140" :show-overflow-tooltip="true">
- <template slot-scope="scope">{{ getWardNames(scope.row.wardCodes) }}</template>
- </el-table-column>
- <el-table-column label="澶囨敞" align="center" prop="remark" min-width="150" :show-overflow-tooltip="true" />
- <el-table-column label="鍒涘缓鑰�" align="center" prop="createBy" width="100" />
- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="160" />
- <el-table-column label="鎿嶄綔" align="center" width="120" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">淇敼</el-button>
- <el-button size="mini" type="text" icon="el-icon-delete" style="color: #f56c6c" @click="handleDelete(scope.row)">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
+ <!-- 绌烘�� -->
+ <div v-else class="advice-empty">
+ <span class="empty-icon">{{ type.icon }}</span>
+ <p>鏆傛棤{{ type.label }}璁板綍</p>
+ <el-button size="small" type="primary" plain icon="el-icon-plus" @click="handleAdd(type.value)">鏂板{{ type.label }}</el-button>
+ </div>
+ </el-tab-pane>
+ </el-tabs>
<!-- 鏂板/缂栬緫寮圭獥 -->
- <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
- <el-form-item label="寤鸿绫诲瀷" prop="adviceType">
- <el-radio-group v-model="form.adviceType">
- <el-radio label="1">鎶曡瘔</el-radio>
- <el-radio label="2">寤鸿</el-radio>
- <el-radio label="3">琛ㄦ壃</el-radio>
- </el-radio-group>
+ <el-dialog
+ :title="dialogTitle"
+ :visible.sync="open"
+ width="560px"
+ append-to-body
+ :close-on-click-modal="false"
+ >
+ <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+ <el-form-item label="绫诲瀷">
+ <el-tag :type="currentTypeTag" size="small">{{ currentTypeText }}</el-tag>
</el-form-item>
<el-form-item label="娑夊強绉戝" prop="deptCodes">
- <el-select v-model="form.deptCodes" multiple filterable clearable placeholder="璇烽�夋嫨娑夊強绉戝" style="width: 100%">
+ <el-select v-model="form.deptCodes" multiple filterable clearable placeholder="璇烽�夋嫨娑夊強绉戝锛堝彲澶氶�夛級" style="width: 100%">
<el-option v-for="d in deptOptions" :key="d.value" :label="d.label" :value="d.value" />
</el-select>
</el-form-item>
<el-form-item label="娑夊強鐥呭尯" prop="wardCodes">
- <el-select v-model="form.wardCodes" multiple filterable clearable placeholder="璇烽�夋嫨娑夊強鐥呭尯" style="width: 100%">
+ <el-select v-model="form.wardCodes" multiple filterable clearable placeholder="璇烽�夋嫨娑夊強鐥呭尯锛堝彲澶氶�夛級" style="width: 100%">
<el-option v-for="w in wardOptions" :key="w.value" :label="w.label" :value="w.value" />
</el-select>
</el-form-item>
@@ -91,7 +73,7 @@
<el-input v-model="form.involvedUsers" placeholder="娑夊強浜哄憳浠g爜锛屽涓敤閫楀彿鍒嗛殧" />
</el-form-item>
<el-form-item label="鍐呭" prop="content">
- <el-input type="textarea" :rows="3" v-model="form.content" placeholder="璇疯緭鍏ユ姇璇�/寤鸿/琛ㄦ壃鍐呭" />
+ <el-input type="textarea" :rows="4" v-model="form.content" :placeholder="'璇疯緭鍏�' + currentTypeText + '鍐呭'" />
</el-form-item>
<el-form-item label="澶囨敞" prop="remark">
<el-input type="textarea" :rows="2" v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" />
@@ -106,7 +88,7 @@
</template>
<script>
-import { listAdvice, getAdvice, addAdvice, updateAdvice, delAdvice } from "@/api/followvisit/advice";
+import { listAdvice, getAdvice, addAdvice, updateAdvice } from "@/api/followvisit/advice";
import store from "@/store";
export default {
@@ -123,23 +105,19 @@
return {
loading: false,
adviceList: [],
- total: 0,
- ids: [],
- single: true,
- multiple: true,
- title: "",
+ activeType: "1",
open: false,
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- adviceType: undefined,
- content: undefined
- },
+ dialogTitle: "",
+ currentType: "1",
form: {},
rules: {
- adviceType: [{ required: true, message: "璇烽�夋嫨寤鸿绫诲瀷", trigger: "change" }],
content: [{ required: true, message: "璇疯緭鍏ュ唴瀹�", trigger: "blur" }]
- }
+ },
+ adviceTypes: [
+ { value: "1", label: "鎶曡瘔", icon: "鈿狅笍", className: "type-complaint", tagType: "danger" },
+ { value: "2", label: "寤鸿", icon: "馃挕", className: "type-suggest", tagType: "primary" },
+ { value: "3", label: "琛ㄦ壃", icon: "馃憤", className: "type-praise", tagType: "success" }
+ ]
};
},
computed: {
@@ -148,77 +126,56 @@
},
wardOptions() {
return (store.getters.belongWards || []).map(w => ({ label: w.districtName, value: w.districtCode }));
+ },
+ currentTypeText() {
+ const t = this.adviceTypes.find(x => x.value === this.currentType);
+ return t ? t.label : "";
+ },
+ currentTypeTag() {
+ const t = this.adviceTypes.find(x => x.value === this.currentType);
+ return t ? t.tagType : "info";
}
},
created() {
this.getList();
},
methods: {
- adviceTypeText(t) {
- const map = { "1": "鎶曡瘔", "2": "寤鸿", "3": "琛ㄦ壃" };
- return map[t] || "鏈煡";
- },
- adviceTypeTag(t) {
- const map = { "1": "danger", "2": "primary", "3": "success" };
- return map[t] || "info";
+ getAdviceByType(type) {
+ return this.adviceList.find(item => String(item.adviceType) === String(type));
},
getDeptNames(codes) {
- if (!codes) return "-";
- const arr = codes.split(",").filter(Boolean);
- const names = arr.map(c => {
+ if (!codes) return "";
+ return codes.split(",").filter(Boolean).map(c => {
const found = this.deptOptions.find(d => d.value == c);
return found ? found.label : c;
- });
- return names.join("銆�") || "-";
+ }).join("銆�");
},
getWardNames(codes) {
- if (!codes) return "-";
- const arr = codes.split(",").filter(Boolean);
- const names = arr.map(c => {
+ if (!codes) return "";
+ return codes.split(",").filter(Boolean).map(c => {
const found = this.wardOptions.find(w => w.value == c);
return found ? found.label : c;
- });
- return names.join("銆�") || "-";
+ }).join("銆�");
},
getList() {
this.loading = true;
- // 鍒嗛〉鍙傛暟璧� query锛岃繃婊ゆ潯浠惰蛋 body
const body = {
subid: this.subid || undefined,
taskid: this.taskid || undefined,
- patid: this.patid || undefined,
- adviceType: this.queryParams.adviceType || undefined,
- content: this.queryParams.content || undefined
+ patid: this.patid || undefined
};
- const query = {
- pageNum: this.queryParams.pageNum,
- pageSize: this.queryParams.pageSize
- };
+ const query = { pageNum: 1, pageSize: 100 };
listAdvice(body, query).then(res => {
this.adviceList = res.rows || [];
- this.total = res.total || 0;
this.loading = false;
}).catch(() => { this.loading = false; });
},
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- resetQuery() {
- this.queryParams.adviceType = undefined;
- this.queryParams.content = undefined;
- this.handleQuery();
- },
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- reset() {
+
+ resetForm() {
this.form = {
id: undefined,
- adviceType: "1",
+ adviceType: this.currentType,
deptCodes: [],
wardCodes: [],
involvedUsers: "",
@@ -226,28 +183,35 @@
remark: ""
};
},
- handleAdd() {
- this.reset();
- this.title = "鏂板鎶曡瘔寤鸿";
+
+ handleAdd(type) {
+ this.currentType = type;
+ this.resetForm();
+ this.dialogTitle = "鏂板" + this.currentTypeText;
this.open = true;
},
- handleUpdate(row) {
- this.reset();
- this.title = "淇敼鎶曡瘔寤鸿";
- getAdvice(row.id).then(res => {
- const data = res.data || {};
- this.form = {
- id: data.id,
- adviceType: data.adviceType || "1",
- deptCodes: data.deptCodes ? data.deptCodes.split(",").filter(Boolean) : [],
- wardCodes: data.wardCodes ? data.wardCodes.split(",").filter(Boolean) : [],
- involvedUsers: data.involvedUsers || "",
- content: data.content || "",
- remark: data.remark || ""
- };
- this.open = true;
- });
+
+ handleEdit(type) {
+ this.currentType = type;
+ const existing = this.getAdviceByType(type);
+ if (existing) {
+ getAdvice(existing.id).then(res => {
+ const data = res.data || existing;
+ this.form = {
+ id: data.id,
+ adviceType: data.adviceType || type,
+ deptCodes: data.deptCodes ? data.deptCodes.split(",").filter(Boolean) : [],
+ wardCodes: data.wardCodes ? data.wardCodes.split(",").filter(Boolean) : [],
+ involvedUsers: data.involvedUsers || "",
+ content: data.content || "",
+ remark: data.remark || ""
+ };
+ this.dialogTitle = "淇敼" + this.currentTypeText;
+ this.open = true;
+ });
+ }
},
+
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) return;
@@ -275,41 +239,77 @@
}
});
});
- },
- handleDelete(row) {
- const ids = row.id ? [row.id] : this.ids;
- if (!ids.length) {
- this.$modal.msgWarning("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
- return;
- }
- this.$modal.confirm("鏄惁纭鍒犻櫎鎵�閫夋姇璇夊缓璁紵").then(() => {
- return delAdvice(ids.join(","));
- }).then(res => {
- if (res.code === 200) {
- this.getList();
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }
- }).catch(() => {});
- },
- handleExport() {
- this.download(
- "/system/serviceSubtaskAdvice/export",
- {
- subid: this.subid,
- taskid: this.taskid,
- patid: this.patid,
- adviceType: this.queryParams.adviceType,
- content: this.queryParams.content
- },
- `闅忚寤鸿鏁版嵁_${new Date().getTime()}.xlsx`
- );
}
}
};
</script>
<style lang="scss" scoped>
-.advice-list {
- padding: 10px 0;
+.advice-blocks {
+ padding: 0;
+
+ ::v-deep .el-tabs__item {
+ .tab-icon {
+ margin-right: 4px;
+ }
+ }
+}
+
+.advice-content {
+ padding: 16px 20px;
+ border-radius: 6px;
+ border-left: 4px solid transparent;
+ background: #fafafa;
+
+ &.type-complaint { border-left-color: #f56c6c; }
+ &.type-suggest { border-left-color: #409eff; }
+ &.type-praise { border-left-color: #67c23a; }
+
+ .advice-head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 10px;
+ .advice-label {
+ font-size: 14px;
+ font-weight: 600;
+ color: #303133;
+ }
+ }
+
+ .advice-text {
+ font-size: 14px;
+ color: #303133;
+ line-height: 1.7;
+ margin-bottom: 10px;
+ word-break: break-all;
+ }
+
+ .advice-meta {
+ font-size: 13px;
+ color: #909399;
+ margin-bottom: 6px;
+ .meta-item {
+ display: inline-block;
+ margin-right: 16px;
+ i { margin-right: 4px; color: #606266; }
+ }
+ }
+
+ .advice-foot {
+ display: flex;
+ justify-content: space-between;
+ font-size: 12px;
+ color: #c0c4cc;
+ padding-top: 10px;
+ border-top: 1px solid #ebeef5;
+ }
+}
+
+.advice-empty {
+ padding: 50px 0;
+ text-align: center;
+ .empty-icon { font-size: 36px; display: block; margin-bottom: 12px; }
+ p { color: #c0c4cc; font-size: 14px; margin-bottom: 16px; }
}
</style>
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 3932f7e..89f2297 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -368,7 +368,7 @@
<div>闅忚鍐呭</div>
</div>
<div>
- <el-tabs v-model="activeName" type="border-card">
+ <el-tabs v-model="activeName" type="card">
<el-tab-pane name="wj">
<span class="mulsz" slot="label"
><i class="el-icon-notebook-1"></i> 闂嵎闅忚缁撴灉</span
@@ -984,106 +984,79 @@
</el-form>
</div>
- <!-- 鎮h�呮。妗堜俊鎭� -->
- <div class="detailed">
- <h3>鎮h�呮。妗堜俊鎭�</h3>
- <el-form ref="userform" :model="userform" label-width="100px">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鎮h�呭鍚�" prop="name">
- <el-input
- v-model="userform.name"
- placeholder="璇疯緭鍏ュ鍚�"
- maxlength="30"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鎬у埆" prop="sex">
- <el-select v-model="userform.sex" placeholder="璇烽�夋嫨">
- <el-option label="鐢�" :value="1"> </el-option>
- <el-option label="濂�" :value="2"> </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="骞撮緞" prop="age">
- <el-input
- v-model="userform.age"
- placeholder="璇疯緭鍏ュ勾榫�"
- maxlength="20"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鑱旂郴鏂瑰紡" prop="telcode">
- <el-input
- v-model="userform.telcode"
- placeholder="璇疯緭鍏ヨ仈绯绘柟寮�"
- maxlength="20"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="浜插睘鑱旂郴鏂瑰紡" prop="relativetelcode">
- <el-input
- v-model="userform.relativetelcode"
- placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�"
- maxlength="20"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
- <el-input
- v-model="form.leavediagname"
- placeholder="璇疯緭鍏ヨ瘖鏂�"
- maxlength="50"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="鍑虹敓鍦�" prop="birthplace">
- <el-input
- v-model="userform.birthplace"
- placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅"
- maxlength="50"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="灞呬綇鍦�" prop="placeOfResidence">
- <el-input
- v-model="userform.placeOfResidence"
- placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅"
- maxlength="50"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
+ <!-- 鎶樺彔闈㈡澘锛氭偅鑰呮。妗堜俊鎭� + 鎶曡瘔寤鸿 -->
+ <div class="collapse-section">
+ <el-collapse v-model="collapseActive" accordion>
+ <el-collapse-item title="鎮h�呮。妗堜俊鎭�" name="patient">
+ <el-form ref="userform2" :model="userform" label-width="90px" size="small">
+ <el-row :gutter="16">
+ <el-col :span="12">
+ <el-form-item label="鎮h�呭鍚�">
+ <el-input v-model="userform.name" placeholder="璇疯緭鍏ュ鍚�" maxlength="30"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎬у埆">
+ <el-select v-model="userform.sex" placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-option label="鐢�" :value="1"></el-option>
+ <el-option label="濂�" :value="2"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="16">
+ <el-col :span="12">
+ <el-form-item label="骞撮緞">
+ <el-input v-model="userform.age" placeholder="璇疯緭鍏ュ勾榫�" maxlength="20"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鑱旂郴鏂瑰紡">
+ <el-input v-model="userform.telcode" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" maxlength="20"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="16">
+ <el-col :span="24">
+ <el-form-item label="浜插睘鐢佃瘽">
+ <el-input v-model="userform.relativetelcode" placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�" maxlength="20"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="16">
+ <el-col :span="24">
+ <el-form-item label="璇婃柇鍚嶇О">
+ <el-input v-model="form.leavediagname" placeholder="璇疯緭鍏ヨ瘖鏂�" maxlength="50"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="16">
+ <el-col :span="24">
+ <el-form-item label="鍑虹敓鍦�">
+ <el-input v-model="userform.birthplace" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="16">
+ <el-col :span="24">
+ <el-form-item label="灞呬綇鍦�">
+ <el-input v-model="userform.placeOfResidence" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-collapse-item>
+ <el-collapse-item title="鎶曡瘔寤鸿" name="advice" v-if="orgname=='缂欎簯鍘夸汉姘戝尰闄�'">
+ <AdviceList :subid="taskid" :taskid="id" :patid="patid" />
+ </el-collapse-item>
+ </el-collapse>
</div>
+
+
+
</div>
</div>
</div>
- <!-- 鎶曡瘔寤鸿 -->
- <el-card class="advice-card">
- <div slot="header" class="clearfix">
- <span class="detail-title">鎶曡瘔寤鸿</span>
- </div>
- <AdviceList :subid="taskid" :taskid="id" :patid="patid" />
- </el-card>
<!-- 鐭俊鍙戦�佸璇濇 -->
<el-dialog title="鐭俊鍙戦��" :visible.sync="smsDialogVisible">
<!-- 娉ㄦ剰杩欓噷浣跨敤浜� smsDialogVisible 浠ュ尯鍒嗗凡鏈夌殑 dialogFormVisible -->
@@ -1420,6 +1393,7 @@
return {
visitAgain: 1,
activeNames: ["next"], // 鍙睍寮�"涓嬫闅忚"锛屽叾浠栭兘鎶樺彔
+ collapseActive: ["patient"], // 浜哄伐澶勭悊鎶樺彔闈㈡澘婵�娲婚」锛堥粯璁ゅ睍寮�鎮h�呮。妗堬級
userid: "",
defaultKey: false, //鏄惁鍙粯璁ゅ~鎶�
currentPhoneNumber: "",
@@ -4155,12 +4129,57 @@
background-color: #fff;
}
-.advice-card {
- margin: 0 10px 20px 10px;
- .detail-title {
- font-size: 16px;
- font-weight: 600;
- color: #303133;
+.collapse-section {
+ width: 100%;
+ align-self: stretch;
+ margin-top: 10px;
+
+ ::v-deep .el-collapse {
+ border: none;
+
+ .el-collapse-item__header {
+ background: linear-gradient(135deg, #ecf5ff 0%, #f5f9ff 100%);
+ border-radius: 8px;
+ padding: 0 20px;
+ height: 48px;
+ font-size: 16px;
+ font-weight: 700;
+ color: #303133;
+ border-bottom: 1px solid #e4e7ed;
+ margin-bottom: 8px;
+ letter-spacing: 1px;
+
+ .el-collapse-item__arrow {
+ font-size: 16px;
+ color: #409eff;
+ }
+
+ &:hover {
+ background: linear-gradient(135deg, #e0efff 0%, #ecf5ff 100%);
+ }
+
+ &.is-active {
+ border-bottom-color: transparent;
+ color: #409eff;
+ }
+ }
+
+ .el-collapse-item__wrap {
+ border-bottom: none;
+ padding: 4px 2px 8px;
+ }
+
+ .el-collapse-item__content {
+ padding: 16px;
+ background: #fff;
+ border-radius: 8px;
+ border: 1px solid #ebeef5;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
+ }
+ }
+
+ .el-form-item {
+ margin-bottom: 12px;
}
}
</style>
diff --git "a/\351\232\217\350\256\277\345\244\226\351\223\276.zip" "b/\351\232\217\350\256\277\345\244\226\351\223\276.zip"
new file mode 100644
index 0000000..a328946
--- /dev/null
+++ "b/\351\232\217\350\256\277\345\244\226\351\223\276.zip"
Binary files differ
diff --git "a/\351\232\217\350\256\277\351\200\232\347\224\2508.18.zip" "b/\351\232\217\350\256\277\351\200\232\347\224\2508.18.zip"
new file mode 100644
index 0000000..73edf37
--- /dev/null
+++ "b/\351\232\217\350\256\277\351\200\232\347\224\2508.18.zip"
Binary files differ
--
Gitblit v1.9.3