From 54d166e290ae2a0042002ddb4684b51e4bd207d9 Mon Sep 17 00:00:00 2001 From: heimawl <1785969728@qq.com> Date: 星期三, 05 七月 2023 16:55:04 +0800 Subject: [PATCH] 11 --- src/views/followvisit/tasklist/index.vue | 17 src/views/complaint/complaintmy/AddComplaint/index.vue | 17 src/views/patient/physical/index.vue | 17 src/views/complaint/complaintmy/index.vue | 872 ++++++++++++++++++++++++ src/websocket/lemon-message-voice.vue | 31 vue.config.js | 4 src/views/shortmessage/communication/index.vue | 110 +- src/views/patient/questionnaire/index.vue | 17 src/views/patient/subsequent/index.vue | 17 src/views/followvisit/satisfaction/index.vue | 17 src/api/noteapi/chitchat.js | 11 /dev/null | 35 src/views/patient/propaganda/index.vue | 17 src/main.js | 2 src/views/patient/servefn/index.vue | 27 package.json | 1 src/views/patient/review/index.vue | 17 src/views/complaint/complaintlist/index.vue | 886 ++++++++++++++++++++++++ src/views/patient/follow/index.vue | 17 19 files changed, 2,037 insertions(+), 95 deletions(-) diff --git a/package.json b/package.json index 89fe2f8..5477964 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", + "@vue/babel-plugin-jsx": "^1.1.5", "axios": "0.24.0", "clipboard": "2.0.8", "codemirror": "^5.65.13", diff --git a/src/api/noteapi/chitchat.js b/src/api/noteapi/chitchat.js new file mode 100644 index 0000000..12c05f5 --- /dev/null +++ b/src/api/noteapi/chitchat.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi";//澶勭悊瀛楃涓�,und,null杞崲涓�''; + +// 鑱婂ぉ妗嗕笂浼犳枃浠� +export function chitchatapi(data) { + return request({ + url: '/system/file/admin/uploadFile', + method: 'post', + data: data + }) +}; \ No newline at end of file diff --git a/src/main.js b/src/main.js index e21d599..5d1eefd 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,8 @@ selectDictLabels, handleTree, } from "@/utils/ruoyi"; +import LemonMessageVoice from './websocket/lemon-message-voice'; +Vue.component(LemonMessageVoice.name,LemonMessageVoice); // 鍒嗛〉缁勪欢 import Pagination from "@/components/Pagination"; // 鑷畾涔夎〃鏍煎伐鍏风粍浠� diff --git a/src/views/complaint/complaintlist/index.vue b/src/views/complaint/complaintlist/index.vue index c1f894c..a1c32bd 100644 --- a/src/views/complaint/complaintlist/index.vue +++ b/src/views/complaint/complaintlist/index.vue @@ -1,17 +1,893 @@ <template> - <div>鎶曡瘔鍒楄〃</div> + <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="鎶曡瘔鎻愪氦鏃堕棿"> + <el-date-picker + v-model="dateRange" + style="width: 240px" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></el-date-picker> + </el-form-item> + <el-form-item label="鐥呬汉鎼滅储" prop="userName"> + <el-input + v-model="topqueryParams.userName" + placeholder="璇疯緭鍏�" + clearable + style="width: 200px" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + + <el-form-item label="琚姇璇夌瀹�" prop="status"> + <el-cascader + v-model="topqueryParams.tagid" + :options="optionss" + :props="propss" + clearable + ></el-cascader> + </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 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" + plain + 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-table-column + label="鐥呬汉濮撳悕" + align="center" + key="userName" + prop="userName" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎵嬫満鍙�" + align="center" + key="types" + prop="types" + /> + <el-table-column + label="鎬у埆" + 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="topicnumber" + prop="topicnumber" + width="120" + :show-overflow-tooltip="true" + /><el-table-column + label="鎻愪氦浜�" + align="center" + key="topicnumber" + prop="topicnumber" + width="120" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎻愪氦鏃堕棿" + align="center" + prop="createTime" + width="160" + > + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.createTime) }}</span> + </template> + </el-table-column> + <el-table-column + label="灏辫瘖鏃ユ湡" + align="center" + prop="createTime" + width="160" + > + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.createTime) }}</span> + </template> + </el-table-column> + <el-table-column + label="鎶曡瘔鏃ユ湡" + align="center" + prop="createTime" + width="160" + > + <template slot-scope="scope"> + <span>{{ parseTime(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" v-if="scope.row.userId !== 1"> + <el-button + size="medium" + type="text" + icon="el-icon-edit" + @click="Referencequestion(scope.row)" + v-hasPermi="['system:user:edit']" + >棰勮</el-button + > + <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-col> + </el-row> + + <!-- 娣诲姞鎴栦慨鏀规姇璇夐厤缃璇濇 --> + <el-dialog + :title="title" + :visible.sync="addalteropen" + width="900px" + append-to-body + > + <el-form ref="form" :model="form" :rules="rules" label-width="100px"> + <el-row> + <el-col :span="12"> + <el-form-item label="鎶曡瘔鍚嶇О" prop="nickName"> + <el-input + v-model="form.nickName" + placeholder="璇疯緭鍏�" + maxlength="30" + /> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎶曡瘔绫诲瀷" prop="deptId"> + <el-select v-model="form.types" 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-col> + </el-row> + <el-row> + <el-form-item label="绛旀閫夐」" prop="email"> + <el-tag + :key="tag" + v-for="tag in dynamicTags" + closable + :disable-transitions="false" + @close="handleClose(tag)" + > + {{ tag }} + </el-tag> + <el-input + class="input-new-tag" + v-if="inputVisible" + v-model="inputValue" + ref="saveTagInput" + size="small" + @keyup.enter.native="handleInputConfirm" + @blur="handleInputConfirm" + > + </el-input> + <el-button + v-else + class="button-new-tag" + size="small" + @click="showInput" + >+ 鏂板閫夐」</el-button + > + </el-form-item> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="鎶曡瘔鏍囩" prop="email"> + <el-cascader + v-model="form.totagid" + :options="optionss" + :props="propss" + clearable + ></el-cascader> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="鏄惁鍚敤"> + <el-radio-group v-model="form.qystatus"> + <el-radio + v-for="item in qyoptions" + :key="item.value" + :label="item.value" + >{{ item.label }}</el-radio + > + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鏄惁蹇呭~"> + <el-radio-group v-model="form.btstatus"> + <el-radio + v-for="item in btoptions" + :key="item.value" + :label="item.value" + >{{ item.label }}</el-radio + > + </el-radio-group> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <el-form-item label="澶囨敞"> + <el-input + v-model="form.remark" + type="textarea" + placeholder="璇疯緭鍏ュ唴瀹�" + ></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + <!-- 鎶曡瘔棰勮寮规 --> + <el-dialog width="30%" title="鎶曡瘔棰勮" :visible.sync="previewVisible"> + <div class="qrcode-dialo"> + <!-- 鍗曢�� --> + <div class="topic-dev" v-if="previewtype == 1"> + <div class="dev-text"> + [鍗曢�塢  <span>{{ previewvalue.username }}</span> + </div> + <div class="dev-xx"> + <el-radio-group v-model="radio"> + <el-radio + v-for="(items, index) in dynamicTags" + :key="index" + :label="index" + >{{ items }}</el-radio + > + </el-radio-group> + </div> + </div> + <!-- 澶氶�� --> + <div class="topic-dev" v-else-if="previewtype == 2"> + <div class="dev-text"> + [澶氶�塢  <span>{{ previewvalue.username }}</span> + </div> + <div class="dev-xx"> + <el-checkbox-group v-model="radios"> + <el-checkbox + v-for="(items, index) in dynamicTags" + :key="index" + :label="index" + > + {{ items }} + </el-checkbox> + </el-checkbox-group> + </div> + </div> + <!-- 濉┖ --> + <div class="topic-dev" v-if="previewtype == 3"> + <div class="dev-text"> + [濉┖]  <span>{{ previewvalue.username }}</span> + </div> + <div class="dev-xx"> + <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable> + </el-input> + </div> + </div> + </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"; + export default { + name: "User", + dicts: ["sys_normal_disable", "sys_user_sex"], + components: { Treeselect }, data() { - return {}; + 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: "杩欎釜鍖荤敓瀵逛綘鎬庝箞鏍�", + }, + // 琛ㄥ崟鍙傛暟 + form: { + phonenumber: "", + totagid: "", + types: "", + nickName: "", + qystatus: "", + btstatus: "", + }, + //瀵煎叆杩涘害 + dractive: 1, + // 瀵煎叆灞曠ず琛ㄥ崟 + uploadingData: {}, + // 鏌ヨ鍙傛暟 + topqueryParams: { + pageNum: 1, + pageSize: 10, + userName: undefined, + tagid: undefined, + topic: undefined, + }, + propss: { multiple: true }, + optionss: [ + { + value: 1, + label: "涓滃崡", + }, + { + value: 2, + label: "瑗垮寳", + }, + { + value: 3, + label: "浠ㄤ花浠�", + }, + { + value: 4, + label: "鍏椋掗", + }, + ], + qyoptions: [ + { + value: 1, + label: "鍚敤", + }, + { + value: 2, + label: "鍏抽棴", + }, + ], + btoptions: [ + { + value: 1, + label: "蹇呭~", + }, + { + value: 2, + label: "闈炲繀濉�", + }, + ], + topicoptions: [ + { + value: 1, + label: "鍗曢��", + }, + { + value: 2, + label: "澶氶��", + }, + { + value: 3, + label: "濉┖", + }, + ], + // 琛ㄥ崟鏍¢獙 + 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", + }, + ], + }, + }; }, + watch: {}, + created() { + this.getList(); + this.getConfigKey("sys.user.initPassword").then((response) => { + this.initPassword = response.msg; + }); + }, + methods: { + /** 鏌ヨ鎶曡瘔鍒楄〃 */ + 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; + }, - created() {}, + // 鎶曡瘔鐘舵�佷慨鏀� + 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: [], + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.topqueryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.dateRange = []; + this.resetForm("queryForm"); + this.topqueryParams.deptId = undefined; + this.$refs.tree.setCurrentKey(null); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.userId); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + //鍒犻櫎閫夐」 + handleClose(tag) { + this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); + }, + //瑙﹀彂鏂板杈撳叆 + 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(); + getUser().then((response) => { + this.postOptions = response.posts; + this.roleOptions = response.roles; + this.addalteropen = true; + this.title = "鏂板鎶曡瘔"; + this.form.password = this.initPassword; + }); + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + 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 = ""; + }); + }, + /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ + 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(() => {}); + }, - methods: {}, + /** 鎻愪氦鎸夐挳 */ + 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(); + }); + } else { + addUser(this.form).then((response) => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const userIds = row.userId || this.ids; + this.$modal + .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�') + .then(function () { + return delUser(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download( + "system/user/export", + { + ...this.topqueryParams, + }, + `user_${new Date().getTime()}.xlsx` + ); + }, + }, }; </script> -<style lang="scss" scoped></style> +<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> diff --git a/src/views/complaint/complaintmy/AddComplaint/index.vue b/src/views/complaint/complaintmy/AddComplaint/index.vue new file mode 100644 index 0000000..08f2014 --- /dev/null +++ b/src/views/complaint/complaintmy/AddComplaint/index.vue @@ -0,0 +1,17 @@ +<template> + <div>tjiats</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/complaint/complaintmy/index.vue b/src/views/complaint/complaintmy/index.vue index 7c13ca3..fcdc24c 100644 --- a/src/views/complaint/complaintmy/index.vue +++ b/src/views/complaint/complaintmy/index.vue @@ -1,17 +1,877 @@ <template> - <div>鎴戠殑鎶曡瘔</div> + <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" + plain + 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-table-column + label="鐥呬汉濮撳悕" + align="center" + sortable + key="userName" + prop="userName" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎵嬫満鍙�" + align="center" + key="types" + prop="types" + /> + <el-table-column + label="鎬у埆" + 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>{{ parseTime(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-col> + </el-row> + <!-- 娣诲姞鎴栦慨鏀规姇璇夊璇濇 --> + <el-dialog + :title="title" + :visible.sync="addalteropen" + width="900px" + append-to-body + > + <el-form ref="form" :model="form" label-width="80px"> + <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="鎬у埆"> + <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.input3" + class="input-with-select" + > + <el-button slot="append" icon="el-icon-search"></el-button> + </el-input> + </div> + </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="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> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">鎻� 浜�</el-button> + <el-button @click="cancel">杩� 鍥�</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"; + export default { + name: "User", + dicts: ["sys_normal_disable", "sys_user_sex"], + components: { Treeselect }, data() { - return {}; + 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: { + pageNum: 1, + pageSize: 10, + userName: undefined, + tagid: undefined, + topic: undefined, + }, + propss: { multiple: true }, + options: [], + + topicoptions: [ + { + value: 1, + label: "鍗曢��", + }, + { + value: 2, + label: "澶氶��", + }, + { + value: 3, + label: "濉┖", + }, + ], + // 琛ㄥ崟鏍¢獙 + 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", + }, + ], + }, + }; }, + watch: {}, + 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: { + /** 鏌ヨ鎶曡瘔鍒楄〃 */ + 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: [], + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.topqueryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.dateRange = []; + this.resetForm("queryForm"); + this.topqueryParams.deptId = undefined; + this.$refs.tree.setCurrentKey(null); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.userId); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + //鍒犻櫎閫夐」 + handleClose(tag) { + this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); + }, + //瑙﹀彂鏂板杈撳叆 + 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; + // }); + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + 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 = ""; + }); + }, + /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ + 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(() => {}); + }, - created() {}, - - methods: {}, + /** 鎻愪氦鎸夐挳 */ + 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(); + }); + } else { + addUser(this.form).then((response) => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const userIds = row.userId || this.ids; + this.$modal + .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�') + .then(function () { + return delUser(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download( + "system/user/export", + { + ...this.topqueryParams, + }, + `user_${new Date().getTime()}.xlsx` + ); + }, + }, }; </script> -<style lang="scss" scoped></style> +<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> diff --git a/src/views/followvisit/satisfaction/index.vue b/src/views/followvisit/satisfaction/index.vue new file mode 100644 index 0000000..e6b4411 --- /dev/null +++ b/src/views/followvisit/satisfaction/index.vue @@ -0,0 +1,17 @@ +<template> + <div>婊℃剰搴﹁皟鏌�</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue new file mode 100644 index 0000000..9ff8630 --- /dev/null +++ b/src/views/followvisit/tasklist/index.vue @@ -0,0 +1,17 @@ +<template> + <div>浠诲姟鍒楄〃</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/patient/follow/index.vue b/src/views/patient/follow/index.vue new file mode 100644 index 0000000..289990c --- /dev/null +++ b/src/views/patient/follow/index.vue @@ -0,0 +1,17 @@ +<template> + <div>鎮h�呭洖璁�</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/patient/physical/index.vue b/src/views/patient/physical/index.vue new file mode 100644 index 0000000..80e4c31 --- /dev/null +++ b/src/views/patient/physical/index.vue @@ -0,0 +1,17 @@ +<template> + <div>浣撴閫氱煡</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/patient/propaganda/index.vue b/src/views/patient/propaganda/index.vue new file mode 100644 index 0000000..54b99d1 --- /dev/null +++ b/src/views/patient/propaganda/index.vue @@ -0,0 +1,17 @@ +<template> + <div>瀹f暀鏈嶅姟</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/patient/questionnaire/index.vue b/src/views/patient/questionnaire/index.vue new file mode 100644 index 0000000..5e70d58 --- /dev/null +++ b/src/views/patient/questionnaire/index.vue @@ -0,0 +1,17 @@ +<template> + <div>闂嵎鏈嶅姟</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/patient/review/index.vue b/src/views/patient/review/index.vue new file mode 100644 index 0000000..7f55ecf --- /dev/null +++ b/src/views/patient/review/index.vue @@ -0,0 +1,17 @@ +<template> + <div>澶嶆煡閫氱煡</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/patient/servefn/index.vue b/src/views/patient/servefn/index.vue new file mode 100644 index 0000000..92b4835 --- /dev/null +++ b/src/views/patient/servefn/index.vue @@ -0,0 +1,27 @@ +<template> + <div> +鎮h�呮湇鍔� + </div> +</template> + +<script> +export default { + data () { + return { + + } + }, + + created () { + + }, + + methods: { + + } +} +</script> + +<style lang='scss' scoped> + +</style> diff --git a/src/views/patient/subsequent/index.vue b/src/views/patient/subsequent/index.vue new file mode 100644 index 0000000..80297ee --- /dev/null +++ b/src/views/patient/subsequent/index.vue @@ -0,0 +1,17 @@ +<template> + <div>澶嶈瘖閫氱煡</div> +</template> + +<script> +export default { + data() { + return {}; + }, + + created() {}, + + methods: {}, +}; +</script> + +<style lang="scss" scoped></style> diff --git a/src/views/shortmessage/communication/index.vue b/src/views/shortmessage/communication/index.vue index 4bb666e..afcbac4 100644 --- a/src/views/shortmessage/communication/index.vue +++ b/src/views/shortmessage/communication/index.vue @@ -63,8 +63,8 @@ </template> <script> -import LemonMessageVoice from "./lemon-message-voice"; import EmojiData from "./database/emoji"; +import { chitchatapi } from "@/api/noteapi/chitchat"; import { sendWebsocket, websocketSend, @@ -106,6 +106,9 @@ }; export default { name: "communication", + provide: { + IMUI: "IMUI value", + }, data() { return { theme: "blue", @@ -296,19 +299,19 @@ setTimeout(() => { IMUI.changeContact("contact-1"); }, 500); - + // 宸︿晶鑱旂郴浜烘渶鏂版秷鎭� IMUI.setLastContentRender("event", (message) => { return `[鑷畾涔夐�氱煡鍐呭]`; }); - let contactList = [ { ...contactData1 }, { ...contactData2 }, { ...contactData3 }, //...Array(100).fill(contactData1) ]; - + // 鍒濆鑱旂郴浜� IMUI.initContacts(contactList); + // 鍒濆鍖栧乏渚у鑸� IMUI.initMenus([ { name: "messages", @@ -369,7 +372,7 @@ isBottom: true, }, ]); - + // 宸ュ叿鏍� IMUI.initEditorTools([ { name: "emoji", @@ -495,6 +498,7 @@ IMUI.messageViewToBottom(); } }, + // 瀹氫箟鏂版秷鎭� appendCustomMessage() { const { IMUI } = this.$refs; const message = { @@ -588,54 +592,66 @@ requstWs(message, next, file) { console.log("杩炴帴"); // 闃叉鐢ㄦ埛澶氭杩炵画鐐瑰嚮鍙戣捣璇锋眰锛屾墍浠ヨ鍏堝叧闂笂娆$殑ws璇锋眰銆� - // closeWebsocket(); + closeWebsocket(); + let formData = new FormData(); - if (file) { - const reader = new FileReader(); - console.log(reader); - console.log(file); - reader.onload = (file) => { - console.log(file); - console.log(reader); - const imageData = reader.result; - //鏂囦欢瀛楄妭澶у皬 - // const fileSize = file.loaded; - const fileSize = imageData.length; - console.log("byteLength 锛� ", fileSize); - const chunkSize = 4096; // 璁剧疆姣忎釜鏁版嵁鍧楃殑澶у皬 - let offset = 0; + // if (file) { + // const reader = new FileReader(); + // console.log(reader); + // console.log(file); + // reader.onload = (file) => { + // console.log(file); + // console.log(reader); + // const imageData = reader.result; + // //鏂囦欢瀛楄妭澶у皬 + // // const fileSize = file.loaded; + // const fileSize = imageData.length; + // console.log("byteLength 锛� ", fileSize); + // const chunkSize = 4096; // 璁剧疆姣忎釜鏁版嵁鍧楃殑澶у皬 + // let offset = 0; - // 鍒嗗潡浼犺緭鍥剧墖鏁版嵁 - while (offset < imageData.length) { - const chunk = imageData.slice(offset, offset + chunkSize); - const obj = { - type: file.type, - userId: "1", //鎺ユ敹鏁版嵁鏂� - fileSize: fileSize, - image: chunk, - }; - console.log(JSON.stringify(obj)); - // 鍙戣捣ws璇锋眰 - // sendWebsocket( - // "ws://192.168.31.121:8080/chat?userId=2", - // JSON.stringify(obj), - // this.wsMessage, - // this.wsError - // ); - websocketSend(JSON.stringify(obj)); - offset += chunkSize; + // // 鍒嗗潡浼犺緭鍥剧墖鏁版嵁 + // while (offset < imageData.length) { + // const chunk = imageData.slice(offset, offset + chunkSize); + // const obj = { + // type: file.type, + // userId: "1", //鎺ユ敹鏁版嵁鏂� + // fileSize: fileSize, + // image: chunk, + // }; + // console.log(JSON.stringify(obj)); + // // 鍙戣捣ws璇锋眰 + // // sendWebsocket( + // // "ws://192.168.31.121:8080/chat?userId=2", + // // JSON.stringify(obj), + // // this.wsMessage, + // // this.wsError + // // ); + // websocketSend(JSON.stringify(obj)); + // offset += chunkSize; - console.log("offset 锛� ", offset); - } + // console.log("offset 锛� ", offset); + // } - // 鍙戦�佸畬鎴愭爣璁� - console.log("message "); - }; + // // 鍙戦�佸畬鎴愭爣璁� + // console.log("message "); + // }; - return reader.readAsDataURL(file); - } + // return reader.readAsDataURL(file); + // } // 璺熷悗绔崗鍟嗭紝闇�瑕佷粈涔堝弬鏁版暟鎹粰鍚庡彴 + if (file) { + formData.append("files", file); + console.log(formData.get("files")); + // img.src = window.URL.createObjectURL(temp); + chitchatapi(formData).then((response) => { + console.log(response); + }); + + return console.log(formData); + } + const obj = { type: "object", userId: "1", //鎺ユ敹鏁版嵁鏂� @@ -644,7 +660,7 @@ }; // 鍙戣捣ws璇锋眰 sendWebsocket( - "ws://192.168.31.121:8080/chat?userId=2", + "ws://192.168.1.4:8080/chat?userId=2", obj, this.wsMessage, this.wsError diff --git a/src/views/shortmessage/communication/lemon-message-voice.vue b/src/views/shortmessage/communication/lemon-message-voice.vue deleted file mode 100644 index 1f91e54..0000000 --- a/src/views/shortmessage/communication/lemon-message-voice.vue +++ /dev/null @@ -1,35 +0,0 @@ -<script> -export default { - name: "lemonMessageVoice", - inheritAttrs: false, - inject: ["IMUI"], - render() { - return ( - <lemon-message-basic - class="lemon-message-voice" - props={{ ...this.$attrs }} - scopedSlots={{ - content: (props) => { - return <span>{props.content} 馃攬</span>; - }, - }} - /> - ); - }, -}; -</script> -<style lang="scss" scoped> -.lemon-message.lemon-message-voice { - user-select: none; - - .lemon-message__content { - border: 2px solid #000; - font-size: 12px; - cursor: pointer; - - &::before { - display: none; - } - } -} -</style> diff --git a/src/websocket/lemon-message-voice.vue b/src/websocket/lemon-message-voice.vue new file mode 100644 index 0000000..da978a9 --- /dev/null +++ b/src/websocket/lemon-message-voice.vue @@ -0,0 +1,31 @@ +<script> +export default { + name: "lemonMessageVoice", + inheritAttrs: false, + inject: ["IMUI"], + render(h) { + return h("lemon-message-basic", { + class: "lemon-message-voice", + props: { ...this.$attrs, avatar: "default-avatar-url" }, // Provide a default value for avatar + scopedSlots: { + content: (props) => { + return h("span", [props.content, "\u00A0馃攬"]); + }, + }, + }); + }, +}; +</script> +<style lang="scss"> +.lemon-message.lemon-message-voice { + user-select: none; + .lemon-message__content { + border: 2px solid #000; + font-size: 12px; + cursor: pointer; + &::before { + display: none; + } + } +} +</style> diff --git a/vue.config.js b/vue.config.js index a807cde..034b409 100644 --- a/vue.config.js +++ b/vue.config.js @@ -35,8 +35,8 @@ proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target1: `http://192.168.31.121:8080`, - target: `http://192.168.31.121:8080`, + target1: `http://192.168.1.4:8080`, + target: `http://192.168.1.4:8080`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' -- Gitblit v1.9.3