From 880e036a0d85cd542034794c1dac2a4e433c5553 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 03 七月 2025 10:51:04 +0800 Subject: [PATCH] 测试完成 --- src/views/followvisit/satisfaction/index.vue | 852 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 847 insertions(+), 5 deletions(-) diff --git a/src/views/followvisit/satisfaction/index.vue b/src/views/followvisit/satisfaction/index.vue index e6b4411..1de1266 100644 --- a/src/views/followvisit/satisfaction/index.vue +++ b/src/views/followvisit/satisfaction/index.vue @@ -1,17 +1,859 @@ <template> - <div>婊℃剰搴﹁皟鏌�</div> + <div class="app-container"> + <el-row :gutter="20"> + <!--鐢ㄦ埛鏁版嵁--> + + <el-form + :model="topqueryParams" + ref="queryForm" + size="small" + :inline="true" + v-show="showSearch" + label-width="98px" + > + <el-form-item label="鐥呭尯鍚嶇О"> + <el-input placeholder="璇疯緭鍏ユ偅鑰呯梾鍖�" v-model="topqueryParams.hospitaldistrictname"></el-input> + </el-form-item> + <el-form-item label="绉戝鍚嶇О"> + <el-input placeholder="璇疯緭鍏ユ偅鑰呯瀹�" v-model="topqueryParams.deptname"></el-input> + </el-form-item> + <el-form-item label="鎮h�呭悕绉�"> + <el-input placeholder="璇疯緭鍏ユ偅鑰呭鍚�" v-model="topqueryParams.patName"></el-input> + </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-select v-model="tasktopic" placeholder="璇烽�夋嫨鏂板绫诲瀷"> + <el-option + v-for="item in taskoptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </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="1.5"> + <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="id" prop="id" /> + + <el-table-column + label="鐥呭尯" + align="center" + width="120" + key="hospitaldistrictname" + prop="hospitaldistrictname" + :show-overflow-tooltip="true" + /> + <el-table-column + label="绉戝" + width="120" + align="center" + key="deptname" + prop="deptname" + :show-overflow-tooltip="true" + /> + <el-table-column + label="濮撳悕" + align="center" + key="patName" + prop="patName" + width="120" + /> + <el-table-column + label="鑱旂郴鐢佃瘽" + align="center" + key="phone" + prop="phone" + width="150" + show-overflow-tooltip + /> + <el-table-column + label="鐪熷疄鎬�(20)" + align="center" + key="authenticity" + prop="authenticity" + sortable + width="120" + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.authenticity" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.authenticity }}</span> + </template> + </el-table-column> + <el-table-column + label="涓�鍛ㄥ唴瀹屾垚(20)" + align="center" + key="weekFinish" + prop="weekFinish" + sortable + width="150" + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.weekFinish" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.weekFinish }}</span> + </template> + </el-table-column> + <el-table-column + label="瑙勮寖鎬�(10)" + align="center" + key="standard" + prop="standard" + width="120" + sortable + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.standard" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.standard }}</span> + </template> + </el-table-column> + <el-table-column + label="鍙婃椂鎬�(10)" + align="center" + key="timeliness" + prop="timeliness" + sortable + width="150" + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.timeliness" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.timeliness }}</span> + </template> + </el-table-column> + <el-table-column + label="瀹f暀鎯呭喌(10)" + align="center" + key="library" + prop="library" + sortable + width="150" + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.library" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.library }}</span> + </template> + </el-table-column> + <el-table-column + label="鐜婊℃剰搴�(10)" + align="center" + key="environment" + prop="environment" + sortable + width="150" + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.environment" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.environment }}</span> + </template> + </el-table-column> + + <el-table-column + label="鍖荤敓婊℃剰搴�(10)" + align="center" + key="doctorSatisfaction" + prop="doctorSatisfaction" + width="150" + sortable + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.doctorSatisfaction" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.doctorSatisfaction }}</span> + </template> + </el-table-column> + <el-table-column + label="鎶ゅ+婊℃剰搴�(10)" + align="center" + key="nurseSatisfaction" + prop="nurseSatisfaction" + width="150" + sortable + > + <template slot-scope="scope"> + <el-input-number + v-if="scope.row.editing" + v-model="scope.row.nurseSatisfaction" + :min="0" + :max="20" + size="small" + controls-position="right" + /> + <span v-else>{{ scope.row.nurseSatisfaction }}</span> + </template> + </el-table-column> + <el-table-column + label="鎬诲垎" + fixed="right" + align="center" + key="total" + prop="total" + sortable + > + </el-table-column> + <el-table-column + label="鎿嶄綔" + align="center" + fixed="right" + width="200" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button + v-if="!scope.row.editing" + size="medium" + type="text" + @click="handleDelete(scope.row)" + ><span class="button-zx" + ><i class="el-icon-delete"></i>鍒犻櫎</span + ></el-button + > + <el-button + size="medium" + type="text" + @click="toggleEdit(scope.row, scope.$index)" + > + <span class="button-textxga"> + <i + :class="scope.row.editing ? 'el-icon-check' : 'el-icon-edit'" + ></i> + {{ scope.row.editing ? "淇濆瓨" : "缂栬緫" }} + </span> + </el-button> + <el-button + v-if="scope.row.editing" + size="medium" + type="text" + @click="handleCancel(scope.row, scope.$index)" + >鍙栨秷</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> + </div> </template> <script> +import { + listsatisfaction, + delsatisfaction, + updatesatisfaction, + changeUserStatus, +} from "@/api/AiCentre/index"; +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: [], + taskoptions: [ + { + value: "1", + label: "闂ㄨ瘖鐥呬汉", + }, + { + value: "2", + label: "鍑洪櫌鐥呬汉", + }, + { + value: "3", + label: "鍖绘姢浜哄憳", + }, + ], + tasktopic: null, //鏂板绫诲瀷 + // 瑙掕壊閫夐」 + roleOptions: [], + dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」 + inputVisible: false, + inputValue: "", + previewVisible: false, //褰卞儚闅忚棰勮寮规 + radio: "", + radios: [], + previewtype: 2, //棰勮褰卞儚闅忚绫诲瀷 + total: 0, // 鎬绘潯鏁� + ImportQuantity: 999, //瀵煎奖鍍忛殢璁挎暟閲� + //棰勮褰卞儚闅忚淇℃伅 + previewvalue: { + username: "杩欎釜鍖荤敓瀵逛綘鎬庝箞鏍�", + }, + value: [], + list: [], + loading: false, + states: [], + 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: "", + }, + // 鏌ヨ鍙傛暟 + 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: "鎵ц瀹屾垚", + }, + { + value: 4, + 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; + listsatisfaction(this.topqueryParams).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 = []; + } + }, + // 鍙栨秷鎸夐挳 + 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; + this.$router.push({ + path: "/Intelligentcenter/satisfaction/particulars", + query: { type: this.tasktopic }, + }); + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + toggleEdit(row, index) { + if (row.editing) { + // 淇濆瓨閫昏緫 + updatesatisfaction(row).then((response) => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.$set(this.userList, index, { + ...row, + editing: false, + // 璁$畻鎬诲垎 + total: this.calculateTotal(row), + }); + }); - created() {}, + // 杩欓噷鍙互娣诲姞API璋冪敤淇濆瓨鏁版嵁 + } else { + // 杩涘叆缂栬緫妯″紡 + this.$set(this.userList, index, { + ...row, + editing: true, + // 淇濆瓨鍘熷鏁版嵁鐢ㄤ簬鍙兘鐨勫彇娑堟搷浣� + originalData: { ...row }, + }); + } + }, + handleCancel(row, index) { + this.$set(this.userList, index, row.originalData); + }, + calculateTotal(row) { + return ( + (row.authenticity || 0) + + (row.weekFinish || 0) + + (row.standard || 0) + + (row.timeliness || 0) + + (row.library || 0) + + (row.environment || 0) + + (row.doctorSatisfaction || 0) + + (row.nurseSatisfaction || 0) + ); + }, - methods: {}, + /** 鎻愪氦鎸夐挳 */ + submitForm: function () { + this.$refs["form"].validate((valid) => { + if (valid) { + if (this.form.userId != undefined) { + updatesatisfaction(this.form).then((response) => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const userIds = row.id || this.ids; + this.$modal + .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + row.patName + '"鐨勬暟鎹」锛�') + .then(function () { + return delsatisfaction(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download( + "smartor/satisfaction/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; + } + } +} +.button-bb { + font-weight: 500; + color: #2ba05c; +} +.button-xq { + font-weight: 500; + color: #409eff; +} +.button-sc { + font-weight: 500; + color: #dd302a; +} +// .button-zx { +// background: #e94f4f; +// padding: 5px; +// border-radius: 1px; +// color: #ffffff; +// } +.el-table .cell .el-input-number { + width: 100%; +} + +/* 鎸夐挳鏍峰紡 */ +.button-zx { + color: #f56c6c; +} +.button-textxga { + color: #409eff; +} + +::v-deep.el-radio-group { + span { + font-size: 24px; + } +} + +::v-deep.el-checkbox-group { + span { + font-size: 24px; + } +} +</style> -- Gitblit v1.9.3