From 5cfc97edd66731e2ebeea36072ec160a25a7bbf3 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期四, 23 十一月 2023 18:21:44 +0800 Subject: [PATCH] qxtj --- src/views/doctor/check/index.vue | 329 ++++++ src/api/hosp/hzlog.js | 47 + vue.config.js | 4 src/api/mall/memo.js | 51 + src/layout/components/Navbar.vue | 9 src/api/hosp/replylog.js | 54 + src/router/index.js | 6 src/api/system/dept.js | 7 src/views/hosp/replylog/index.vue | 439 +++++++++ src/views/paiban/gerenpaiban/index.vue | 668 ++++++++----- src/views/doctor/checkAll/index.vue | 2 src/views/hosp/hzlog/index.vue | 407 ++++++++ src/api/mall/timeConfig.js | 46 + src/main.js | 5 src/layout/components/Sidebar/index.vue | 3 src/views/system/notice/index.vue | 31 src/api/doctor/checkAll.js | 10 src/views/paiban/beiwanglu/index.vue | 260 ++++- src/views/doctor/bgsh/index.vue | 359 ------- 19 files changed, 2,021 insertions(+), 716 deletions(-) diff --git a/src/api/doctor/checkAll.js b/src/api/doctor/checkAll.js index e307965..10e59ea 100644 --- a/src/api/doctor/checkAll.js +++ b/src/api/doctor/checkAll.js @@ -89,3 +89,13 @@ data: updateOrderRemarkVos }) } + +// 鎶ュ憡鏍告敹 +export function heXiaoByIds(orderIds) { + return request({ + url: '/hosp/order/heXiaoByIds/'+orderIds, + method: 'post', + // data: orderIds + }) +} + diff --git a/src/api/hosp/hzlog.js b/src/api/hosp/hzlog.js new file mode 100644 index 0000000..b173bdd --- /dev/null +++ b/src/api/hosp/hzlog.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +// 鏌ヨ浼氳瘖鐢宠璁板綍 +export function listHzlog(query) { + return request({ + url: '/hosp/hzlog/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ浼氳瘖鐢宠璁板綍 +export function getHzlog(id) { + return request({ + url: '/hosp/hzlog/' + id, + method: 'get' + }) +} + +// 鏂板浼氳瘖鐢宠璁板綍 + +export function addHzlog(data) { + return request({ + url: '/hosp/hzlog', + method: 'post', + data: data + }) +} + +// 淇敼浼氳瘖鐢宠璁板綍 + +export function updateHzlog(data) { + return request({ + url: '/hosp/hzlog', + method: 'put', + data: data + }) +} + +// 鍒犻櫎浼氳瘖鐢宠璁板綍 + +export function delHzlog(id) { + return request({ + url: '/hosp/hzlog/' + id, + method: 'delete' + }) +} diff --git a/src/api/hosp/replylog.js b/src/api/hosp/replylog.js new file mode 100644 index 0000000..cd12d9d --- /dev/null +++ b/src/api/hosp/replylog.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 鏌ヨ浼氳瘖鍥炲璁板綍鍒楄〃 +export function listReplylog(query) { + return request({ + url: '/hosp/replylog/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ浼氳瘖鍥炲璁板綍璇︾粏 +export function getReplylog(id) { + return request({ + url: '/hosp/replylog/' + id, + method: 'get' + }) +} + +// 鏂板浼氳瘖鍥炲璁板綍 +export function addReplylog(data) { + return request({ + url: '/hosp/replylog', + method: 'post', + data: data + }) +} + +// 淇敼浼氳瘖鍥炲璁板綍 +export function updateReplylog(data) { + return request({ + url: '/hosp/replylog', + method: 'put', + data: data + }) +} + +// 鍒犻櫎浼氳瘖鍥炲璁板綍 +export function delReplylog(id) { + return request({ + url: '/hosp/replylog/' + id, + method: 'delete' + }) +} + + +// 鏌ヨ浼氳瘖鍥炲璁板綍鍒楄〃 +export function hzHasDept(query) { + return request({ + url: '/hosp/hzlog/hzHasDept', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/mall/memo.js b/src/api/mall/memo.js new file mode 100644 index 0000000..025b373 --- /dev/null +++ b/src/api/mall/memo.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' + +// 鏂板 +export function memo(data) { + return request({ + url: '/mall/memo', + method: 'post', + data: data + }) +} +// 淇敼 +export function eictmemo(data) { + return request({ + url: '/mall/memo', + method: 'put', + data: data + }) +} + +// 鍒犻櫎 +export function delememo(id) { + return request({ + url: '/mall/memo/' + id, + method: 'delete', + }) +} + + +// 鏌ヨ +export function listByUserAndDate(query) { + return request({ + url: '/mall/memo/listByUserAndDate', + method: 'get', + params: query + }) +} +// 鏌ヨ +export function listByDate(query) { + return request({ + url: '/mall/memo/listByDate', + method: 'get', + params: query + }) +} + + + + + + + diff --git a/src/api/mall/timeConfig.js b/src/api/mall/timeConfig.js index 76770ef..2835506 100644 --- a/src/api/mall/timeConfig.js +++ b/src/api/mall/timeConfig.js @@ -59,3 +59,49 @@ method: 'get', }) } + +// 鑾峰彇鎵�鏈夊尰鐢熶俊鎭暟鎹垪琛ㄦ帴鍙� +export function getUserList(query) { + return request({ + url: '/mall/schedulingTime/getUserListBySchedulingTimt', + method: 'get', + params: query + }) +} + + +// 鑾峰彇鎺掔彮淇℃伅涓存椂鏁版嵁鎺ュ彛 +export function getScheduling(data) { + return request({ + url: '/mall/schedulingTime/getSchedulingInformation', + method: 'post', + data: data + }) +} + +// 鏂板鍖荤敓鎺掔彮淇℃伅鏁版嵁鎺ュ彛 +export function timeConfig(mallSchedulingTimes) { + return request({ + url: 'mall/schedulingTime', + method: 'post', + data: mallSchedulingTimes + }) +} + +// 鍋滆瘖鎺ュ彛 +export function updateIsClose(data) { + return request({ + url: '/mall/schedulingTime/updateIsClose', + method: 'post', + data: data + }) +} + + +// 浜哄憳绫诲埆 +export function roleList() { + return request({ + url: '/system/role/list', + method: 'get', + }) +} diff --git a/src/api/system/dept.js b/src/api/system/dept.js index e73ff5f..ac7d2d5 100644 --- a/src/api/system/dept.js +++ b/src/api/system/dept.js @@ -73,3 +73,10 @@ }) } +// 鏌ヨ瀛愰儴闂� +export function getChildList() { + return request({ + url: '/system/dept/getChildList', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index efd5513..31f21e5 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -24,6 +24,15 @@ </el-dropdown-menu> </el-dropdown> </div> + <div style="margin-left: 5px;"> + <el-tooltip content="閫氱煡鍏憡" effect="dark"> + <router-link :to="{ path: '/notice' }"> + <i class="el-icon-message-solid"></i> + </router-link> + + </el-tooltip> + + </div> <div> <template v-if="device !== 'mobile'"> diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 9509fc5..1d23080 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -2,8 +2,9 @@ <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <logo v-if="showLogo" :collapse="isCollapse" /> <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> + <!-- :default-openeds="['/tijian']" --> <el-menu - :default-openeds="['/tijian']" + :default-active="activeMenu" :collapse="isCollapse" :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" diff --git a/src/main.js b/src/main.js index cc7942b..3a603d5 100644 --- a/src/main.js +++ b/src/main.js @@ -37,15 +37,10 @@ import { monitorZoom } from "@/utils/devicePixelRatio.js"; const m = monitorZoom(); -console.log(window.screen.width) -console.log(window.devicePixelRatio) if (window.screen.width * window.devicePixelRatio >= 3840) { - console.log(111111) document.body.style.zoom = 100 / (Number(m) / 2); // 灞忓箷涓� 4k 鏃� } else { - console.log(22222) document.body.style.zoom = 100 / Number(m); - console.log(document.body.style.zoom) } // 鑷畾涔夎〃鏍煎伐鍏风粍浠� diff --git a/src/router/index.js b/src/router/index.js index 80443e1..3c1f7ac 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -58,6 +58,12 @@ name:'rmer', meta: { title: '鐭ヨ瘑搴撶鐞� ', icon: 'dashboard', } }, + { + path: '/notice', + component: () => import('@/views/system/notice/index'), + name:'rmer', + meta: { title: '閫氱煡鍏憡 '} + }, ] }, { diff --git a/src/views/doctor/bgsh/index.vue b/src/views/doctor/bgsh/index.vue index 9534540..ae9b205 100644 --- a/src/views/doctor/bgsh/index.vue +++ b/src/views/doctor/bgsh/index.vue @@ -39,6 +39,7 @@ :data="checkList" ref="table" border + @selection-change="handleSelectionChange" style="margin: 20px; width: 98%" > <el-table-column type="selection" width="40px" align="center" fixed="left" /> @@ -119,9 +120,7 @@ align="center" prop="tjCompName" :show-overflow-tooltip="true" - /> - - + /> </el-table> <div class="pag"> @@ -141,21 +140,8 @@ <script> -import { - getcheckList, - getTjdetailList, - getupdateCheckType, - getModifiedState, - getfiedState, - getState, - getforceIn, - gettoPdf, - getModified, -} from "@/api/doctor/checkAll"; -import { getInfo } from "@/api/login"; +import {getcheckList,heXiaoByIds} from "@/api/doctor/checkAll"; import { getCompany, queryCompany } from "@/api/team/tuanti"; -// import { getDeptAdvice } from "@/api/doctor/check"; -import { getPdf, revoke } from "@/api/hosp/order"; import ViewPdf from "@/components/ViewPdf"; export default { @@ -165,19 +151,7 @@ name: "checkAll", data() { return { - remarks: "", remark: "", - proIds: "", - xiaojie: "", - isdisabled: false, - dialogVisible: false, - src: "", - url: "", - userId: "", - flag: true, - bill: null, - numberList: [], - dialogVisible: false, pickerOptions: { shortcuts: [ { @@ -220,18 +194,10 @@ startTime: [], textarea1: "", loading: true, - // 褰撳墠鐢ㄦ埛閫変腑鐨勫�� - selectLettercurrent: " ", - // 鎶藉眽鎵撳紑鏂瑰紡 - drawer: false, - tableAll: {}, tjNumber: "", - // 鍏ㄩ儴灏忕粨 - DeptadviceAll: [], - MsgId: "", - Deptobj: "", // 鐐瑰嚮鍙傛暟 changedate: [], + orderIds: [], status: {}, // 鏌ヨ鍙傛暟 queryParams: { @@ -243,32 +209,6 @@ compId: null, name: null, checkStatus:null, - }, - - // 鏌ヨ鍙傛暟 - queryParam: { - pageNum: 1, - pageSize: 10, - company: undefined, - companyId: undefined, - pacId: undefined, - pacName: undefined, - jobNo: undefined, - name: undefined, - sex: undefined, - idCard: undefined, - age: undefined, - birthday: undefined, - position: undefined, - department: undefined, - departmentId: undefined, - phoe: undefined, - address: undefined, - marriage: undefined, - nation: undefined, - email: undefined, - tjCategory: undefined, - payType: undefined, }, }; }, @@ -347,62 +287,16 @@ this.loading = false; }); }, - - viewReport(row) { - const tjNumber = row.tjNumber; - const flag = true; - getPdf(tjNumber, flag).then((response) => { - if (response.size === 0) { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); - setTimeout(() => { - loading.close(); - }, 3000); - this.$message.msgSuccess("鎶ュ憡姝e湪鐢熸垚锛岃涓ゅ垎閽熷悗棰勮锛�"); - - } else { - this.dialogVisible = true; - - this.url = window.webkitURL.createObjectURL(response); //灏嗗悗绔繑鍥炵殑blob鏂囦欢璇诲彇鍑簎rl - } - }); - }, - // viewReport(row) { - // const tjNumber = row.tjNumber; - // const viewNum = "792997692059705344"; - // const params = { viewNum, tjNumber }; - // hasReportEnd(tjNumber).then((res) => { - // if (res == 1) { - // this.$tab.openPage("浣撴鎶ュ憡", "/report/viewReport", params); - // } else { - // this.$message.error("璇ョ敤鎴蜂綋妫�鏆傛湭瀹屾垚锛屾棤娉曟墦鍗颁綋妫�鎶ュ憡锛�"); - // } - // }); - // }, - downLoadFileImg(row) { - const tjNumber = row.tjNumber; - const flag = true; - getPdf(tjNumber, flag).then((response) => { - this.url = window.webkitURL.createObjectURL(response); //灏嗗悗绔繑鍥炵殑blob鏂囦欢璇诲彇鍑簎rl - }); + handleSelectionChange(selection) { + this.orderIds = selection.map((item) => item.orderId); + this.single = selection.length !== 1; + this.multiple = !selection.length; }, // 鍗曢�夋寜閽� - radioChange(value) { - this.loading = true; - this.queryParams.checkStatus = value; - getcheckList(this.queryParams).then((response) => { - if (response.data) { - this.checkList = response.data.customers; - this.total = response.data.total; - } else { - this.checkList = []; - } - this.loading = false; + radioChange() { + heXiaoByIds(this.orderIds).then((response) => { + this.$modal.msgSuccess("鎶ュ憡宸叉牳鏀讹紒璇峰墠寰�浣撴璁板綍椤甸潰鏌ョ湅锛�"); }); }, @@ -457,238 +351,9 @@ this.resetForm("tableList"); this.submitForm(); }, - - // 鐐瑰嚮璇︽儏 - handleClick(row) { - this.tableAll = row; - if (this.tableAll.cusSex === 0) { - this.tableAll.cusSex = "鐢�"; - } - if (this.tableAll.cusSex === 1) { - this.tableAll.cusSex = "濂�"; - } - this.tjNumber = this.tableAll.tjNumber; - getState(this.tjNumber).then((res) => { - this.status = res.data; - if (this.status.status === "1") { - getInfo().then((response) => { - this.userId = response.user.userId; - if (this.userId) { - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 0, - }; - getModifiedState(data).then((res) => { - this.MsgId = res.msg; - this.drawer = true; - getupdateCheckType(this.tjNumber).then((response) => { - this.changedate = response.data; - this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice; - }); - if (this.changedate) { - for (let i = 0; i < this.changedate.length; i++) { - this.remark = this.changedate[i].remark; - } - this.changedate.forEach((item) => { - // this.remark = item.remark; - item.sons.forEach((item3) => { - if (item3.standard.tjStandardGtValue === null) { - item3.standard.tjStandardGtValue = ""; - } - if (item3.standard.tjStandardLtValue === null) { - item3.standard.tjStandardLtValue = ""; - } - }); - // item.remark = ""; - }); - } else { - this.$message({ - type: "warning ", - message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", - }); - } - }); - }); - } - }); - } else { - this.$confirm( - "" + this.status.name + "姝e湪淇敼璇ヤ俊鎭�, 鏄惁寮哄埗杩涘幓?", - "鎻愮ず", - { - confirmButtonText: "鏄�", - cancelButtonText: "鍚�", - type: "warning", - } - ) - .then(() => { - getInfo().then((response) => { - this.userId = response.user.userId; - if (this.userId) { - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 0, - }; - getforceIn(data).then((res) => { - this.MsgId = res.msg; - this.drawer = true; - getupdateCheckType(this.tjNumber).then((response) => { - this.changedate = response.data; - if (this.changedate) { - for (let i = 0; i < this.changedate.length; i++) { - this.remark = this.changedate[i].remark; - } - this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice; - - // this.remark = item.remark; - item.sons.forEach((item3) => { - if (item3.standard.tjStandardGtValue === null) { - item3.standard.tjStandardGtValue = ""; - } - if (item3.standard.tjStandardLtValue === null) { - item3.standard.tjStandardLtValue = ""; - } - }); - // item.remark = ""; - }); - } else { - this.$message({ - type: "warning ", - message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", - }); - } - }); - }); - } - }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "宸插彇娑堣繘鍏�", - }); - }); - this.drawer = false; - } - }); - - // 鑾峰彇灏忕粨 - // getDeptAdvice().then((response) => { - // response.data.forEach((item) => { - // this.DeptadviceAll = item; - // }); - // }); - }, - // 鎾ら攢 - getRevoke(row) { - const tjNumber = row.tjNumber; - revoke(tjNumber).then((response) => { - this.$modal.msgSuccess("鎾ゅ洖鎴愬姛"); - }); - }, - - // 鏄惁鍏抽棴寮圭獥 - handleClose(done) { - if (this.loading) { - return; - } - this.$confirm("纭畾瑕佹彁浜ゅ悧锛�") - .then((_) => { - this.loading = true; - this.timer = setTimeout(() => { - done(); - this.determine(); - // 鍔ㄧ敾鍏抽棴闇�瑕佷竴瀹氱殑鏃堕棿 - setTimeout(() => { - this.loading = false; - }, 400); - }, 2000); - }) - .catch((_) => { - this.drawer = false; - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 1, - id: this.MsgId, - }; - getfiedState(data).then((res) => {}); - }); - }, - - // 鐢熸垚鎶ュ憡 - // generate(row) { - // const tjNumber = row.tjNumber; - // getGenerate(tjNumber).then((response) => { - // this.$modal.msgSuccess("鐢熸垚鎴愬姛"); - // }); - // }, - // xiAoJieChange(event) { - // if (event) { - // this.changedate.forEach((item) => { - // item.remark = ""; - // item.parentAdvice.forEach((item1) => { - // event.forEach((item2) => { - // if (item2 == item1.id) { - // item.remark = item.remark + item1.advice + "銆�"; - // } - // }); - // }); - // }); - // } - // }, + change(vale) { // console.log(this.changedate[index].remark); - }, - determine() { - let tjNumber = this.tableAll.tjNumber; - let advice = this.textarea1; - let data = { - tjNumber, - advice, - checkStatus: 1, - }; - getTjdetailList(data).then((response) => { - if (response.code === 200) { - this.$modal.msgSuccess("鎻愪氦鎴愬姛"); - let tjNumber = this.tjNumber; - let data = { - userId: this.userId, - tjNumber: tjNumber, - state: 1, - id: this.MsgId, - }; - gettoPdf(tjNumber).then((res) => { - this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�浣撴璁板綍椤甸潰鏌ョ湅锛�"); - }); - getfiedState(data).then((res) => { - this.drawer = false; - }); - } - }); - - for (let i = 0; i < this.changedate.length; i++) { - this.proIds = this.changedate[i].parentId; - let remarks = this.changedate[i].remark; - let updateOrderRemarkVos = [ - { - tjNumber, - proId: this.proIds.toString(), - remarks, - }, - ]; - getModified(updateOrderRemarkVos).then((response) => {}); - } - this.submitForm() - this.$forceUpdate() - // this.changedate.forEach((item) => { - // this.proIds = item.parentId; - // // this.remark = item.remark; - // }); }, }, }; diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue index aa8c1d8..3e6e008 100644 --- a/src/views/doctor/check/index.vue +++ b/src/views/doctor/check/index.vue @@ -18,24 +18,14 @@ <el-radio-button label="0">鏈</el-radio-button> <el-radio-button label="1">宸叉</el-radio-button> </el-radio-group> - <el-row :gutter="10" class="mb8" style="margin:8px 10px;"> - <el-col :span="1.5"> - <el-button type="primary" - size="mini" - @click="radioChange" - v-hasPermi="['system:notice:add']" - >浼氳瘖鐢宠</el-button> - </el-col> - </el-row> </div> - <template> <el-table :data="tableList" v-loading="loading" ref="table" height="536px" style="margin: 20px; width: 98%" border=""> <!-- <template slot="empty">鏁版嵁姝e湪鍔犺浇涓�</template> --> - <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" width="180px" /> - <el-table-column label="濮撳悕" align="center" prop="cusName" width="100px" /> + <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" width="160px" /> + <el-table-column label="濮撳悕" align="center" prop="cusName" width="90px" /> <el-table-column label="鎬у埆" align="center" prop="cusSex" width="60px"> <template slot-scope="scope"> <span v-if="scope.row.cusSex == '0'">鐢�</span> @@ -44,27 +34,18 @@ <span v-if="scope.row.cusSex == '9'">鏈鏄庢�у埆</span> </template> </el-table-column> - <el-table-column label="鍑虹敓鏃ユ湡" align="center" prop="cusBrithday" width="120px" /> - <el-table-column label="鐢佃瘽" align="center" prop="cusPhone" width="120px" /> - <!-- <el-table-column - label="鐘舵��" - align="center" - prop="tjStatus" - :show-overflow-tooltip="true" - width="80px" - > - <template slot-scope="scope"> - <span>{{ scope.row.tjStatus == "1" ? "宸叉" : "鏈" }}</span> - </template> - </el-table-column> --> - + <el-table-column label="鍑虹敓鏃ユ湡" align="center" prop="cusBrithday" width="100px" /> + <el-table-column label="鐢佃瘽" align="center" prop="cusPhone" width="100px" /> <el-table-column label="浣撴绫诲瀷" align="center" prop="tjType" width="80px" /> <el-table-column label="鐧昏鏃堕棿" align="center" prop="createTime" width="160px" /> - <el-table-column label="浣撴鏃堕棿" align="center" prop="tjTime" width="120px" /> + <el-table-column label="浣撴鏃堕棿" align="center" prop="tjTime" width="100px" /> <el-table-column label="鏈椤�" prop="notCheckeds" :show-overflow-tooltip="true" /> - <el-table-column label="鎿嶄綔" align="center" width="80px"> + <el-table-column label="鎿嶄綔" align="center" width="130px"> <template slot-scope="scope"> - <el-button type="primary" size="mini" @click="handleClick(scope.row)">璇︽儏</el-button> + <el-button type="primary" icon="el-icon-first-aid-kit" size="mini" @click="Changeapplyfor(scope.row)" + title="浼氳瘖鐢宠" v-if="tjStatus == '1'"></el-button> + <el-button type="primary" icon="el-icon-share" size="mini" @click="handleClick(scope.row)" + title="璇︽儏"></el-button> </template> </el-table-column> </el-table> @@ -76,6 +57,89 @@ </div> </div> </template> + + <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> + <el-row> + <el-col :span="7" v-if="hzlogList.length >= 1"> + <h3>浼氳瘖鐢宠璁板綍</h3> + <el-table :data="hzlogList" style="width: 100%" border> + <el-table-column label="鐢宠浜�" align="center" prop="hzDoctorName" width="100px" /> + <el-table-column label="绉戝" align="center" prop="hzDeptName" width="260px" /> + </el-table> + </el-col> + <el-col :span="16"> + <!-- :rules="rules" --> + <el-form ref="form" :model="form" label-width="80px"> + <el-form-item label="濮撳悕" prop="cusName"> + <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ鍚�" disabled /> + </el-form-item> + <el-form-item label="浣撴鍙�" prop="tjNumber"> + <el-input v-model="form.tjNumber" placeholder="璇疯緭鍏ヤ綋妫�鍙�" disabled /> + </el-form-item> + <el-form-item label="浼氳瘖绉戝" prop="hzType"> + <el-radio-group v-model="form.hzType"> + <el-radio-button label="0">鍏ㄩ櫌浼氳瘖</el-radio-button> + <el-radio-button label="1">绉戝浼氳瘖</el-radio-button> + </el-radio-group> + </el-form-item> + <el-form-item label="閫夋嫨绉戝" v-if="form.hzType == '1'"> + <el-select v-model="form.hzDeptId" multiple filterable style="width: 100%"> + <el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName" + :value="item.deptId"></el-option> + </el-select> + </el-form-item> + <el-form-item label="鐢宠浜�" prop="hzDoctorId"> + <el-select v-model="form.hzDoctorId" placeholder="璇烽�夋嫨" style="width: 100%" filterable> + <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId"> + </el-option> + </el-select> + </el-form-item> + <!-- <el-form-item label="鐢宠鏃堕棿" prop="createTime"> + <el-date-picker v-model="form.createTime" type="datetime" placeholder="閫夋嫨鐢宠鏃堕棿"> + </el-date-picker> + </el-form-item> --> + </el-form> + </el-col> + </el-row> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitFormapply">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + + <el-dialog :title="title" :visible.sync="foropen" width="1000px" append-to-body> + <el-row> + <el-col :span="8" v-if="hasdeptList.length >= 1"> + <h3 style="text-align: center;">浼氳瘖鐢宠璁板綍</h3> + <el-table :data="hasdeptList" style="width: 100%" border ref="tab" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="50" align="center" /> + <el-table-column label="鐢宠浜�" align="center" prop="hzDoctorName" width="100px" /> + <el-table-column label="绉戝" align="center" prop="hzDeptName" width="260px" /> + </el-table> + </el-col> + <el-col :span="16" style="padding: 0 10px;"> + <h3 style="text-align: center;">浼氳瘖鎰忚</h3> + <div v-if="hzReplyLogsList.length >= 1" style="margin-bottom: 10px;"> + <div v-for="(item, index) in hzReplyLogsList" :key="index" + style="padding-bottom:5px;border-bottom: 1px solid black;"> + <!-- <div>浼氳瘖绉戝锛歿{ item.replyDeptName }}</div> --> + <div> 鍖荤敓锛歿{ item.hzDoctorName }} </div> + <div>鍥炲锛歿{ item.replyContent }}</div> + </div> + </div> + <el-input type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" v-model="textarea"> + </el-input> + <div style="padding: 10px 10px;"> + <el-button type="primary" @click="submitFormreply">鍥炲</el-button> + </div> + </el-col> + </el-row> + <!-- <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitFormapply">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> --> + </el-dialog> + <!-- 鐐瑰嚮鍙宠竟寮瑰嚭灞� --> <el-drawer :visible.sync="drawer" :with-header="false" size="70%" :before-close="handleClose"> <div style="font-size: 14px"> @@ -128,6 +192,9 @@ </td> </tr> </table> + </div> + <div style="margin: 10px 10px;" v-if="hasdeptList.length >= 1"> + <el-button type="primary" size="mini" @click="Changeapply()">浼氳瘖鐢宠</el-button> </div> <template> @@ -229,6 +296,12 @@ </table> <div slot="footer" class="dialog-footers"> + <!-- <el-button type="primary" + size="mini" + @click="radioChange" + v-hasPermi="['system:notice:add']" + v-show="tjStatus == '1'" + >浼氳瘖鐢宠</el-button> --> <el-button type="primary" @click="determine" v-show="tjStatus == '0'">鎻� 浜�</el-button> </div> </div> @@ -280,6 +353,7 @@ <script> import Public from "@/components/public"; +import { getInfo } from "@/api/login"; import { getProList, getSons, @@ -288,7 +362,12 @@ getParentId, getDeptAdvice, } from "@/api/doctor/check"; +import { + addReplylog, hzHasDept +} from "@/api/hosp/replylog"; +import { listHzlog, addHzlog } from "@/api/hosp/hzlog"; import { listUser } from "@/api/system/user"; +import { getChildList } from "@/api/system/dept"; export default { dicts: ["sys_user_sex", "sys_yes_no", "tj_result_type"], name: "check", @@ -298,7 +377,13 @@ selected: false, // 閬僵灞� loading: false, + open: false, + foropen: false, + cateringList: [], orderDetailId: "", + textarea: "", + title: "", + hzlogList: [], // proDefault: "", // dataList: [], rows: [], @@ -316,8 +401,13 @@ drawerList: [], // 鑾峰彇淇℃伅闆嗗悎 tableList: [], + deptList: [], tableAll: {}, row: {}, + allList: [], + form: { + createTime: new Date() + }, // 鍖荤敓 doctorName: "", // 鐖堕」 @@ -330,6 +420,8 @@ userList: null, // 鐖堕」鐩垪琛� Parent: [], + hzReplyLogsList: [], + hasdeptList: [], radio: "", nums: "", proParentList: [], @@ -341,6 +433,9 @@ summaryAll: [], tjOrderDetailList: [], tjOrderDetail: [], + deptId: "", + userId: "", + nickName: "", date: new Date(new Date().getTime() + 8 * 3600 * 1000) .toJSON() .substr(0, 19) @@ -388,6 +483,12 @@ this.userList = response.rows; } ); + getInfo().then((response) => { + this.form.hzDoctorId = response.user.userId; + this.deptId = response.user.deptId; + this.userId = response.user.userId; + this.nickName = response.user.nickName; + }); }, handleClose() { this.$tab.refreshPage(); @@ -524,8 +625,148 @@ this.submitForm(); }, + Changeapplyfor(row) { + this.open = true; + this.form = row + getChildList().then(res => { + this.deptList = res.data; + }) + + this.Hzlog(this.form.tjNumber) + }, + + Hzlog(val) { + let data = { + tjNumber: val + } + listHzlog(data).then(response => { + this.hzlogList = response.rows; + this.hzlogList.forEach(item => { + item.hzDeptName = "" + if (item.hzType == "0") { + item.hzDeptName = "鍏ㄩ櫌浼氳瘖" + } else { + item.hzDeptIdList.forEach(item1 => { + this.deptList.forEach(item2 => { + if (item1 == item2.deptId) { + item.hzDeptName += item2.deptName + "," + } + }) + }) + } + }) + }); + }, + + submitFormapply() { + let data = {} + this.userList.forEach(item1 => { + if (this.form.hzDoctorId == item1.userId) { + this.form.hzDoctorName = item1.nickName + } + }) + if (this.form.hzDeptId) { + // let hzDeptId = "" + // this.form.hzDeptId.forEach(item => { + // hzDeptId += item + ',' + // }) + data = { + tjNumber: this.form.tjNumber, + userId: this.form.cusId, + userName: this.form.cusName, + hzDeptIdList: this.form.hzDeptId, + hzDoctorId: this.form.hzDoctorId, + hzType: this.form.hzType, + orderId: this.form.orderId, + hzDoctorName: this.form.hzDoctorName + } + } else { + data = { + tjNumber: this.form.tjNumber, + userId: this.form.cusId, + userName: this.form.cusName, + hzDoctorId: this.form.hzDoctorId, + hzType: this.form.hzType, + orderId: this.form.orderId, + hzDoctorName: this.form.hzDoctorName + } + } + + addHzlog(data).then(res => { + if (res.code == 200) { + this.$modal.msgSuccess("鐢宠鎴愬姛"); + this.form = {} + this.Hzlog() + this.radioChange(1) + } + }) + this.open = false; + }, + cancel() { + this.open = false; + this.foropen = false + }, + + Changeapply() { + this.foropen = true + this.Hzlog(this.tableAll.tjNumber) + + }, + submitFormreply() { + let data = { + hzId: this.allList[0].id, + orderId: this.allList[0].orderId, + tjNumber: this.allList[0].tjNumber, + userId: this.allList[0].userId, + userName: this.allList[0].userName, + replyContent: this.textarea, + hzDoctorId: this.allList[0].hzDoctorId, + hzDoctorName: this.allList[0].hzDoctorName, + hzType: this.allList[0].hzType, + replyDoctorName: this.nickName, + replyDeptId: this.deptId, + replyDoctorId: this.userId + + } + addReplylog(data).then(res => { + this.$modal.msgSuccess("鍥炲鎴愬姛"); + this.getDept(this.allList[0].tjNumber) + }) + }, + + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + if (selection.length > 1) { + const newRows = selection.filter((it, index) => { + if (index == selection.length - 1) { + this.$refs.tab.toggleRowSelection(it, true); + return true; + } else { + this.$refs.tab.toggleRowSelection(it, false); + return false; + } + }); + // this.allList = [] + // if(newRows[0].hzReplyLogsList){ + // this.hzReplyLogsList = newRows[0].hzReplyLogsList + // } + // console.log(this.hzReplyLogsList) + // this.allList = newRows + }else{ + this.allList = [] + if(selection[0].hzReplyLogsList){ + this.hzReplyLogsList = selection[0].hzReplyLogsList + }else{ + this.hzReplyLogsList = [] + } + console.log(this.hzReplyLogsList) + this.allList = selection + } + }, + // 鐐瑰嚮璇︽儏 handleClick(row) { + this.getDept(row.tjNumber) this.loading = true; this.drawer = true; this.tableAll = row; @@ -535,7 +776,6 @@ if (this.tableAll.cusSex === 1) { this.tableAll.cusSex = "濂�"; } - this.tjNumber = row.tjNumber; let num = 0; getParentList(this.tjNumber).then((response) => { @@ -601,7 +841,6 @@ num = num + 1; }); }); - getDeptAdvice().then((response) => { this.deptAdviceList = response.data; }); @@ -621,6 +860,34 @@ // }) // }); }, + + getDept(val) { + let data = { + tjNumber: val, + deptId: this.deptId + } + hzHasDept(data).then(res => { + if (res.data) { + this.hasdeptList = res.data + this.hasdeptList.forEach(item => { + item.hzDeptName = "" + if (item.hzType == "0") { + item.hzDeptName = "鍏ㄩ櫌浼氳瘖" + } else { + item.hzDeptIdList.forEach(item1 => { + this.deptList.forEach(item2 => { + if (item1 == item2.deptId) { + item.hzDeptName += item2.deptName + "," + } + }) + }) + } + }) + } + + }) + }, + // 鎸夐挳鐐瑰嚮浜嬩欢 radioChange1(proParentId, item) { this.$confirm( diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index 89401e0..41732ba 100644 --- a/src/views/doctor/checkAll/index.vue +++ b/src/views/doctor/checkAll/index.vue @@ -983,7 +983,7 @@ id: this.MsgId, }; gettoPdf(tjNumber).then((res) => { - this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�浣撴璁板綍椤甸潰鏌ョ湅锛�"); + this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�"); }); getfiedState(data).then((res) => { this.drawer = false; diff --git a/src/views/hosp/hzlog/index.vue b/src/views/hosp/hzlog/index.vue new file mode 100644 index 0000000..9a2937e --- /dev/null +++ b/src/views/hosp/hzlog/index.vue @@ -0,0 +1,407 @@ +<template> + <div class="app-container"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="浣撴鍙�" prop="tjNumber"> + <el-input v-model="queryParams.tjNumber" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable @keyup.enter.native="handleQuery" /> + </el-form-item> + <el-form-item label="鐢ㄦ埛鍚�" prop="userName"> + <el-input v-model="queryParams.userName" placeholder="璇疯緭鍏ョ敤鎴峰悕" clearable @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-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" + v-hasPermi="['hosp:hzlog:add']">鏂板 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" + v-hasPermi="['hosp:hzlog:edit']">淇敼 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" + v-hasPermi="['hosp:hzlog:remove']">鍒犻櫎 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" + v-hasPermi="['hosp:hzlog:export']">瀵煎嚭 + </el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <el-table v-loading="loading" :data="hzlogList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="浼氳瘖id" align="center" prop="id" /> + <el-table-column label="浼氳瘖璁㈠崟id" align="center" prop="orderId" /> + <el-table-column label="鐢ㄦ埛id" align="center" prop="userId" /> + <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" /> + <el-table-column label="鐢ㄦ埛鍚�" align="center" prop="userName" /> + <el-table-column label="浼氳瘖绫诲瀷0鍏ㄩ櫌浼氳瘖1绉戝浼氳瘖" align="center" prop="hzType" /> + <el-table-column label="浼氳瘖绉戝[]" align="center" prop="hzDeptId" /> + <el-table-column label="浼氳瘖鐢宠浜篿d" align="center" prop="hzDoctorId" /> + <el-table-column label="浼氳瘖鐢宠浜哄悕" align="center" prop="hzDoctorName" /> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" + v-hasPermi="['hosp:hzlog:edit']">淇敼 + </el-button> + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" + v-hasPermi="['hosp:hzlog:remove']">鍒犻櫎 + </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="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="浼氳瘖璁㈠崟id" prop="orderId"> + <el-input v-model="form.orderId" placeholder="璇疯緭鍏ヤ細璇婅鍗昳d" /> + </el-form-item> + <el-form-item label="鐢ㄦ埛id" prop="userId"> + <el-input v-model="form.userId" placeholder="璇疯緭鍏ョ敤鎴穒d" /> + </el-form-item> + <el-form-item label="浣撴鍙�" prop="tjNumber"> + <el-input v-model="form.tjNumber" placeholder="璇疯緭鍏ヤ綋妫�鍙�" /> + </el-form-item> + <el-form-item label="鐢ㄦ埛鍚�" prop="userName"> + <el-input v-model="form.userName" placeholder="璇疯緭鍏ョ敤鎴峰悕" /> + </el-form-item> + <el-form-item label="浼氳瘖绉戝[]" prop="hzDeptId"> + <el-input v-model="form.hzDeptId" placeholder="璇疯緭鍏ヤ細璇婄瀹]" /> + </el-form-item> + <el-form-item label="浼氳瘖鐢宠浜篿d" prop="hzDoctorId"> + <el-input v-model="form.hzDoctorId" placeholder="璇疯緭鍏ヤ細璇婄敵璇蜂汉id" /> + </el-form-item> + <el-form-item label="浼氳瘖鐢宠浜哄悕" prop="hzDoctorName"> + <el-input v-model="form.hzDoctorName" 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> + </div> + </el-dialog> + </div> +</template> + +<script> +import { + listHzlog, + getHzlog, + delHzlog, + addHzlog, + updateHzlog +} from "@/api/hosp/hzlog"; + +export default { + name: "Hzlog", + data() { + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 浼氳瘖鐢宠璁板綍 + // 琛ㄦ牸鏁版嵁 + hzlogList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + tjNumber: null, + userName: null, + hzType: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + } + }; + }, + created() { + this.getList(); + }, + methods: { + /** 鏌ヨ浼氳瘖鐢宠璁板綍 +鍒楄〃 */ + getList() { + this.loading = true; + listHzlog(this.queryParams).then(response => { + this.hzlogList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + orderId: null, + userId: null, + tjNumber: null, + userName: null, + hzType: null, + hzDeptId: null, + createTime: null, + updateTime: null, + createBy: null, + updateBy: null, + deleted: null, + hzDoctorId: null, + hzDoctorName: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length !== 1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + // handleAdd() { + // this.reset(); + // this.open = true; + // this.title = "娣诲姞浼氳瘖鐢宠璁板綍 + // "; + // }, + // /** 淇敼鎸夐挳鎿嶄綔 */ + // handleUpdate(row) { + // this.reset(); + // const id = row.id || this.ids + // getHzlog(id).then(response => { + // this.form = response.data; + // this.open = true; + // this.title = "淇敼浼氳瘖鐢宠璁板綍 + // "; + // }); + // }, + /** 鎻愪氦鎸夐挳 */ + // submitForm() { + // this.$]] + // #refs["form"].validate(valid => { + // if (valid) { + // #foreach($column in $columns) + // #if($column.htmlType == "checkbox") + // this.form.$column.javaField = this.form.$ + // { + // column.javaField + // } + // . + // join(","); + // #end + // #end + // #if($table.sub) + // this.form.$ + // { + // subclassName + // } + // List = this.$ + // { + // subclassName + // } + // List; + // #end + // if (this.form.${ + // pkColumn.javaField + // } + // != + // null + // ) + // { + // update$ + // { + // BusinessName + // } + // (this.form).then(response => { + // this.#[[$modal]] + // #.msgSuccess("淇敼鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + // } + // else + // { + // add$ + // { + // BusinessName + // } + // (this.form).then(response => { + // this.#[[$modal]] + // #.msgSuccess("鏂板鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + // } + // } + // }); + // }, + // /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + // handleDelete(row) { + // const ${ pkColumn.javaField }s = row.$ + // { + // pkColumn.javaField + // } + // || + // this.ids; + // this.#[[$modal]] + // #.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + ${ pkColumn.javaField }s + '"鐨勬暟鎹」锛�').then(function () { + // return del$ + // { + // BusinessName + // } + // (${ pkColumn.javaField }s); + // }).then(() => { + // this.getList(); + // this.#[[$modal]] + // #.msgSuccess("鍒犻櫎鎴愬姛"); + // }).catch(() => { + // }); + // }, + // #if($table.sub) + // /** ${subTable.functionName}搴忓彿 */ + // row$ + // { + // subClassName + // } + // Index({ row, rowIndex }) + // { + // row.index = rowIndex + 1; + // } + // , + // /** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ + // handleAdd$ + // { + // subClassName + // } + // () + // { + // let obj = {}; + // #foreach($column in $subTable.columns) + // #if($column.pk || $column.javaField == ${ subTableFkclassName }) + // #elseif($column.list && "" != $javaField) + // obj.$column.javaField = ""; + // #end + // #end + // this.$ + // { + // subclassName + // } + // List.push(obj); + // } + // , + // /** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ + // handleDelete$ + // { + // subClassName + // } + // () + // { + // if (this.checked${ + // subClassName + // } + // . + // length == 0 + // ) + // { + // this.#[[$modal]] + // #.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); + // } + // else + // { + // const ${ subclassName }List = this.$ + // { + // subclassName + // } + // List; + // const checked$ + // { + // subClassName + // } + // = this.checked$ + // { + // subClassName + // } + // ; + // this.$ + // { + // subclassName + // } + // List = ${ subclassName } List.filter(function (item) { + // return checked$ + // { + // subClassName + // } + // . + // indexOf(item.index) == -1 + // }); + // } + // } + // , + // /** 澶嶉�夋閫変腑鏁版嵁 */ + // handle$ + // { + // subClassName + // } + // SelectionChange(selection) + // { + // this.checked$ + // { + // subClassName + // } + // = selection.map(item => item.index) + // } + // , + // #end + // /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + // handleExport() + // { + // this.download('${moduleName}/${businessName}/export', { + // ...this.queryParams + // }, `${businessName}_#[[${new Date().getTime()}.xlsx`) + // } + } +} + ; +</script> diff --git a/src/views/hosp/replylog/index.vue b/src/views/hosp/replylog/index.vue new file mode 100644 index 0000000..d21c803 --- /dev/null +++ b/src/views/hosp/replylog/index.vue @@ -0,0 +1,439 @@ +<template> + <div class="app-container"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="浣撴鍙�" prop="tjNumber"> + <el-input v-model="queryParams.tjNumber" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable @keyup.enter.native="handleQuery" /> + </el-form-item> + <el-form-item label="鐢ㄦ埛鍚�" prop="userName"> + <el-input v-model="queryParams.userName" placeholder="璇疯緭鍏ョ敤鎴峰悕" clearable @keyup.enter.native="handleQuery" /> + </el-form-item> + <el-form-item label="${comment}" prop="hzDoctorName"> + <el-input v-model="queryParams.hzDoctorName" placeholder="璇疯緭鍏�${comment}" clearable + @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-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" + v-hasPermi="['hosp:replylog:add']">鏂板 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" + v-hasPermi="['hosp:replylog:edit']">淇敼 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" + v-hasPermi="['hosp:replylog:remove']">鍒犻櫎 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" + v-hasPermi="['hosp:replylog:export']">瀵煎嚭 + </el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <el-table v-loading="loading" :data="replylogList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="浼氳瘖id" align="center" prop="id" /> + <el-table-column label="浼氳瘖璁㈠崟id" align="center" prop="orderId" /> + <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" /> + <el-table-column label="鐢ㄦ埛id" align="center" prop="userId" /> + <el-table-column label="鐢ㄦ埛鍚�" align="center" prop="userName" /> + <el-table-column label="浼氳瘖绫诲瀷0鍏ㄩ櫌浼氳瘖1绉戝浼氳瘖" align="center" prop="hzType" /> + <el-table-column label="鍥炲鍖荤敓" align="center" prop="replyDoctorId" /> + <el-table-column label="鍥炲鍖荤敓鍚�" align="center" prop="replyDoctorName" /> + <el-table-column label="鍥炲閮ㄩ棬" align="center" prop="replyDeptId" /> + <el-table-column label="鍥炲閮ㄩ棬鍚�" align="center" prop="replyDeptName" /> + <el-table-column label="鍥炲鍐呭" align="center" prop="replyContent" /> + <el-table-column label="" align="center" prop="status" /> + <el-table-column label="" align="center" prop="remark" /> + <el-table-column label="浼氳瘖鐢宠id" align="center" prop="hzId" /> + <el-table-column label="${comment}" align="center" prop="hzDoctorId" /> + <el-table-column label="${comment}" align="center" prop="hzDoctorName" /> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" + v-hasPermi="['hosp:replylog:edit']">淇敼 + </el-button> + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" + v-hasPermi="['hosp:replylog:remove']">鍒犻櫎 + </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="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="浼氳瘖璁㈠崟id" prop="orderId"> + <el-input v-model="form.orderId" placeholder="璇疯緭鍏ヤ細璇婅鍗昳d" /> + </el-form-item> + <el-form-item label="浣撴鍙�" prop="tjNumber"> + <el-input v-model="form.tjNumber" placeholder="璇疯緭鍏ヤ綋妫�鍙�" /> + </el-form-item> + <el-form-item label="鐢ㄦ埛id" prop="userId"> + <el-input v-model="form.userId" placeholder="璇疯緭鍏ョ敤鎴穒d" /> + </el-form-item> + <el-form-item label="鐢ㄦ埛鍚�" prop="userName"> + <el-input v-model="form.userName" placeholder="璇疯緭鍏ョ敤鎴峰悕" /> + </el-form-item> + <el-form-item label="鍥炲鍖荤敓" prop="replyDoctorId"> + <el-input v-model="form.replyDoctorId" placeholder="璇疯緭鍏ュ洖澶嶅尰鐢�" /> + </el-form-item> + <el-form-item label="鍥炲鍖荤敓鍚�" prop="replyDoctorName"> + <el-input v-model="form.replyDoctorName" placeholder="璇疯緭鍏ュ洖澶嶅尰鐢熷悕" /> + </el-form-item> + <el-form-item label="鍥炲閮ㄩ棬" prop="replyDeptId"> + <el-input v-model="form.replyDeptId" placeholder="璇疯緭鍏ュ洖澶嶉儴闂�" /> + </el-form-item> + <el-form-item label="鍥炲閮ㄩ棬鍚�" prop="replyDeptName"> + <el-input v-model="form.replyDeptName" placeholder="璇疯緭鍏ュ洖澶嶉儴闂ㄥ悕" /> + </el-form-item> + <el-form-item label="鍥炲鍐呭"> + <editor v-model="form.replyContent" :min-height="192" /> + </el-form-item> + <el-form-item label="" prop="remark"> + <el-input v-model="form.remark" placeholder="璇疯緭鍏�" /> + </el-form-item> + <el-form-item label="浼氳瘖鐢宠id" prop="hzId"> + <el-input v-model="form.hzId" placeholder="璇疯緭鍏ヤ細璇婄敵璇穒d" /> + </el-form-item> + <el-form-item label="${comment}" prop="hzDoctorId"> + <el-input v-model="form.hzDoctorId" placeholder="璇疯緭鍏�${comment}" /> + </el-form-item> + <el-form-item label="${comment}" prop="hzDoctorName"> + <el-input v-model="form.hzDoctorName" placeholder="璇疯緭鍏�${comment}" /> + </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> + </div> + </el-dialog> + </div> +</template> + +<script> +import { + listReplylog, + getReplylog, + delReplylog, + addReplylog, + updateReplylog +} from "@/api/hosp/replylog"; + +export default { + name: "Replylog", + data() { + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 浼氳瘖鍥炲璁板綍琛ㄦ牸鏁版嵁 + replylogList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + tjNumber: null, + userName: null, + hzType: null, + hzDoctorName: null + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + } + }; + }, + created() { + this.getList(); + }, + methods: { + /** 鏌ヨ浼氳瘖鍥炲璁板綍鍒楄〃 */ + getList() { + this.loading = true; + listReplylog(this.queryParams).then(response => { + this.replylogList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + orderId: null, + tjNumber: null, + userId: null, + userName: null, + hzType: null, + replyDoctorId: null, + replyDoctorName: null, + replyDeptId: null, + replyDeptName: null, + replyContent: null, + status: "0", + remark: null, + createTime: null, + updateTime: null, + createBy: null, + updateBy: null, + deleted: null, + hzId: null, + hzDoctorId: null, + hzDoctorName: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length !== 1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞浼氳瘖鍥炲璁板綍"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getReplylog(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼浼氳瘖鍥炲璁板綍"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + // submitForm() { + // this.$]] + // #refs["form"].validate(valid => { + // if (valid) { + // #foreach($column in $columns) + // #if($column.htmlType == "checkbox") + // this.form.$column.javaField = this.form.$ + // { + // column.javaField + // } + // . + // join(","); + // #end + // #end + // #if($table.sub) + // this.form.$ + // { + // subclassName + // } + // List = this.$ + // { + // subclassName + // } + // List; + // #end + // if (this.form.${ + // pkColumn.javaField + // } + // != + // null + // ) + // { + // update$ + // { + // BusinessName + // } + // (this.form).then(response => { + // this.#[[$modal]] + // #.msgSuccess("淇敼鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + // } + // else + // { + // add$ + // { + // BusinessName + // } + // (this.form).then(response => { + // this.#[[$modal]] + // #.msgSuccess("鏂板鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + // } + // } + // }); + // }, + // /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + // handleDelete(row) { + // const ${pkColumn.javaField}s = row.$ + // { + // pkColumn.javaField + // } + // || + // this.ids; + // this.#[[$modal]] + // #.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + ${pkColumn.javaField}s + '"鐨勬暟鎹」锛�').then(function () { + // return del$ + // { + // BusinessName + // } + // (${pkColumn.javaField}s); + // }).then(() => { + // this.getList(); + // this.#[[$modal]] + // #.msgSuccess("鍒犻櫎鎴愬姛"); + // }).catch(() => { + // }); + // }, + // #if($table.sub) + // /** ${subTable.functionName}搴忓彿 */ + // row$ + // { + // subClassName + // } + // Index({row, rowIndex}) + // { + // row.index = rowIndex + 1; + // } + // , + // /** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ + // handleAdd$ + // { + // subClassName + // } + // () + // { + // let obj = {}; + // #foreach($column in $subTable.columns) + // #if($column.pk || $column.javaField == ${subTableFkclassName}) + // #elseif($column.list && "" != $javaField) + // obj.$column.javaField = ""; + // #end + // #end + // this.$ + // { + // subclassName + // } + // List.push(obj); + // } + // , + // /** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ + // handleDelete$ + // { + // subClassName + // } + // () + // { + // if (this.checked${ + // subClassName + // } + // . + // length == 0 + // ) + // { + // this.#[[$modal]] + // #.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); + // } + // else + // { + // const ${subclassName}List = this.$ + // { + // subclassName + // } + // List; + // const checked$ + // { + // subClassName + // } + // = this.checked$ + // { + // subClassName + // } + // ; + // this.$ + // { + // subclassName + // } + // List = ${subclassName}List.filter(function (item) { + // return checked$ + // { + // subClassName + // } + // . + // indexOf(item.index) == -1 + // }); + // } + // } + // , + // /** 澶嶉�夋閫変腑鏁版嵁 */ + // handle$ + // { + // subClassName + // } + // SelectionChange(selection) + // { + // this.checked$ + // { + // subClassName + // } + // = selection.map(item => item.index) + // } + // , + // #end + // /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + // handleExport() + // { + // this.download('${moduleName}/${businessName}/export', { + // ...this.queryParams + // }, `${businessName}_#[[${new Date().getTime()}.xlsx`) + // } + } +} + ; +</script> diff --git a/src/views/paiban/beiwanglu/index.vue b/src/views/paiban/beiwanglu/index.vue index 7d8e908..0e99a89 100644 --- a/src/views/paiban/beiwanglu/index.vue +++ b/src/views/paiban/beiwanglu/index.vue @@ -4,7 +4,7 @@ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="鏈堜唤" prop="deptName"> - <el-date-picker v-model="value1" type="date" placeholder="閫夋嫨鏃ユ湡"> + <el-date-picker v-model="value1" type="month" placeholder="閫夋嫨鏈�" @change="monthChange"> </el-date-picker> </el-form-item> <el-form-item> @@ -20,55 +20,45 @@ <div class="calendar-day"> {{ data.day.split("-").slice(2).join("-") }} {{ data.isSelected ? '鉁旓笍' : '' }} </div> - <div v-for="(item, index) in calendarData" :key="index" class="is-selected" + <div v-for="(item, index) in cateringList" :key="index" class="is-selected" @click.stop="addPlan(item)"> - <span v-if="item.day == data.day && item.timeDetailsList"> + <span v-if="item.mDate == data.day"> <el-tooltip placement="top"> <div slot="content"> - <div v-for="items in item.timeDetailsList" :key="items.day"> - {{ items.channelName }} : - {{ items.wechatNumber }}涓井淇″彿锛� - 璁″垝鎶曟斁{{ items.planNumber }}锛� - 瀹為檯鍔犱汉 - {{ items.realityNumber }} + <div> + {{ item.event }} </div> </div> // 杩欓噷鍐欎袱閬嶆槸鍥犱负涓�涓槸妗嗛噷灞曠ず锛屼竴涓槸鎮诞缁勪欢鍐呭睍绀虹殑鍐呭 - <div v-for="items in item.timeDetailsList" :key="items.day"> - {{ items.channelName }} : - {{ items.wechatNumber }}涓井淇″彿锛� - 璁″垝鎶曟斁{{ items.planNumber }}锛� - 瀹為檯鍔犱汉 - {{ items.realityNumber }} + <div> + {{ item.mflag == "0" ? "鈼�" : "鈭�" }} + {{ item.title }} + </div> </el-tooltip> </span> </div> + </div> </template> </el-calendar> </div> - <!-- 娣诲姞鎴栦慨鏀硅鍒�+鐥呯瀵硅瘽妗� --> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <div style="margin-bottom: 10px;">鏃堕棿锛歿{ time }}</div> <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true"> <el-form-item label="鏍囬" prop="title"> <el-input v-model="form.title" placeholder="璇疯緭鍏ユ爣棰�" style="width:200px" /> </el-form-item> - <el-form-item label="浜嬩欢" prop="event"> - <el-input v-model="form.event" placeholder="璇疯緭鍏ヤ簨浠�" style="width:200px" /> - </el-form-item> + <el-form-item label="鏃ユ湡绫诲瀷" prop="dateType"> - <el-select v-model="form.dateType" style="width: 94%"> + <el-select v-model="form.dateType" style="width: 100%"> <el-option v-for="dict in dict.type.memo_date_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option> </el-select> </el-form-item> <el-form-item label="鏃堕棿鐐�" prop="mTime" v-if="form.dateType == 1"> - <el-time-picker v-model="form.mTime" :picker-options="{ - selectableRange: '18:30:00 - 20:30:00' - }" placeholder="浠绘剰鏃堕棿鐐�"> + <el-time-picker v-model="form.mTime" format placeholder="浠绘剰鏃堕棿鐐�" style="width:88%"> </el-time-picker> </el-form-item> <el-form-item label="閲嶅鎻愰啋" prop="isRepeat"> @@ -79,10 +69,10 @@ </el-form-item> <el-form-item label="鎻愰啋闂撮殧" prop="repeatTime" v-if="form.isRepeat == 'Y'"> <el-input type="number" v-model="form.repeatTime" placeholder="璇疯緭鍏ユ彁閱掗棿闅�" style="width:200px" - oninput="value=value.replace(/[^0-9.]/g,'')" /> + oninput="value=value.replace(/[^0-9.]/g,'')" /> </el-form-item> - <el-form-item label="澶囧繕鐘舵��" prop="mFlag"> - <el-select v-model="form.mFlag" style="width: 94%"> + <el-form-item label="澶囧繕鐘舵��" prop="mflag" v-if="form.id"> + <el-select v-model="form.mflag" style="width: 94%"> <el-option v-for="dict in dict.type.memo_status" :key="dict.value" :label="dict.label" :value="dict.value"></el-option> </el-select> @@ -93,24 +83,40 @@ :value="dict.value"></el-option> </el-select> </el-form-item> - <el-form-item label="澶囨敞" prop="remark"> - <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" style="width:200px" /> + <el-form-item label="浜嬩欢" prop="event"> + <el-input type="textarea" autosize v-model="form.event" placeholder="璇疯緭鍏ヤ簨浠�" style="min-width:500px" /> </el-form-item> </el-form> - <el-button style="margin: 10px 10px" type="primary" plain size="mini" icon="el-icon-plus" - @click="hableadd">娣诲姞</el-button> - <el-table :data="cateringList" border> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="搴忓彿" align="center" prop="newID" width="55px" /> + + <el-button style="margin: 10px 10px" type="primary" plain size="mini" @click="hableadd">纭</el-button> + <el-button style="margin: 10px 10px" type="primary" plain size="mini" + @click="hablecon">閲嶇疆</el-button> + <el-table :data="cateringList" style="width: 100%" border> <el-table-column label="鏍囬" align="center" prop="title" /> - <el-table-column label="浜嬩欢" align="center" prop="event" /> - <el-table-column label="鏃ユ湡绫诲瀷" align="center" prop="dateType" /> - <el-table-column label="鏃堕棿鐐�" align="center" prop="mTime" /> - <el-table-column label="閲嶅鎻愰啋" align="center" prop="isRepeat" width="150px" /> - <el-table-column label="鎻愰啋闂撮殧" align="center" prop="repeatTime" width="150px" /> - <el-table-column label="澶囧繕鐘舵��" align="center" prop="mFlag" width="150px" /> - <el-table-column label="绱ф�ョ姸鎬�" align="center" prop="stateLevel" width="150px" /> - <el-table-column label="澶囨敞" align="center" prop="remark" width="150px" /> + <el-table-column label="浜嬩欢" align="center" prop="event" width="260px" /> + <el-table-column label="鏃ユ湡绫诲瀷" align="center" prop="dateType"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.memo_date_type" :value="scope.row.dateType" /> + </template> + </el-table-column> + <el-table-column label="鏃堕棿鐐�" align="center" prop="mTime" width="160px" /> + <el-table-column label="閲嶅鎻愰啋" align="center" prop="isRepeat"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isRepeat" /> + </template> + </el-table-column> + <el-table-column label="鎻愰啋闂撮殧/鍒嗛挓" align="center" prop="repeatTime" /> + <el-table-column label="澶囧繕鐘舵��" align="center" prop="mflag"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.memo_status" :value="scope.row.mflag" /> + </template> + </el-table-column> + <el-table-column label="绱ф�ョ姸鎬�" align="center" prop="stateLevel"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.memo_state_level" :value="scope.row.stateLevel" /> + </template> + </el-table-column> + <!-- <el-table-column label="澶囨敞" align="center" prop="remark" width="150px" /> --> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right" width="80px"> <template slot-scope="scope"> @@ -123,15 +129,18 @@ </template> </el-table-column> </el-table> - <div slot="footer" class="dialog-footer"> + <!-- <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> <el-button @click="cancel">鍙� 娑�</el-button> - </div> + </div> --> </el-dialog> </div> </template> <script> +import { memo, listByUserAndDate, listByDate, eictmemo, delememo } from "@/api/mall/memo" +let moment = require("moment"); +import { getInfo } from "@/api/login"; export default { dicts: [ "memo_state_level", @@ -149,41 +158,109 @@ }, title: "", - value1: '', + value1: new Date(), time: '', open: false, value: new Date(), calendarData: [], form: { - mTime: new Date(2016, 9, 10, 18, 40), + mTime: new Date(), }, + userId: "", + userName: "", + value2: "", cateringList: [], // 琛ㄥ崟鏍¢獙 rules: { title: [ - { required: true, message: "鏍囬涓嶈兘涓虹┖", trigger: "change" }, + { required: true, message: "鏍囬涓嶈兘涓虹┖", trigger: "blur" }, ], }, } }, - monthChange(val) { - // 杩欓噷鏄洃鍚椂闂村彉鍖� => @change="monthChange"锛岀劧鍚庝紶鍏ユ棩鍘嗙粍浠� - this.value = val; - // 鏃堕棿鍒囨崲鐨勬椂鍊欙紝椤轰究璋冧釜鎺ュ彛鏌ヨ褰撴湀鏁版嵁 - this.editDetail(); + mounted() { + let prevBtn = document.querySelector( + ".el-calendar__button-group .el-button-group>button:nth-child(1)" + ); + prevBtn.addEventListener("click", e => { + this.timestampToTime(this.value) + this.timeScher() + }); + + //鐐瑰嚮涓嬩竴涓湀 + let nextBtn = document.querySelector( + ".el-calendar__button-group .el-button-group>button:nth-child(3)" + ); + nextBtn.addEventListener("click", () => { + this.timestampToTime(this.value) + this.timeScher() + }); + + //鐐瑰嚮浠婂ぉ + let todayBtn = document.querySelector( + ".el-calendar__button-group .el-button-group>button:nth-child(2)" + ); + todayBtn.addEventListener("click", () => { + this.timestampToTime(this.value) + this.timeScher() + }); + }, + + created() { + this.getList(); }, methods: { - editDetail() { - + getList() { + getInfo().then(res => { + this.userName = res.user.nickName + this.userId = res.user.userId; + this.timestampToTime(this.form.mTime) + this.monthdon() + }) }, + + // 鏈堜唤鏃ユ湡鏌� + monthdon() { + let data = { + userId: this.userId, + mDate: this.time + } + listByUserAndDate(data).then(res => { + this.cateringList = res.data + }) + }, + // 鏀瑰彉鏈堜唤 + monthChange(val) { + // 杩欓噷鏄洃鍚椂闂村彉鍖� => @change="monthChange"锛岀劧鍚庝紶鍏ユ棩鍘嗙粍浠� + this.value = val; + }, + // 鎼滅储 handleQuery() { - + this.timestampToTime(this.value1) + this.timeScher() }, + // 鏈堟煡璇� + timeScher() { + let data = { + userId: this.userId, + mDate: this.value2, + } + listByDate(data).then(res => { + this.cateringList = res.data + }) + }, + // 鐐瑰嚮浜嬩欢 addPlan(val) { this.open = true this.title = "鏂板鏃ヨ鍒�" - this.timestampToTime(val) + if (val.mDate) { + this.time = val.mDate + } else { + this.timestampToTime(val) + } + this.monthdon() }, + // 鏃堕棿杞寲 timestampToTime(timestamp) { var date = new Date(timestamp); var y = date.getFullYear(); @@ -197,22 +274,63 @@ var second = date.getSeconds(); second = second < 10 ? ('0' + second) : second; this.time = y + '-' + m + '-' + d; + this.form.mTime = y + '-' + m + '-' + d + " " + h + ':' + minute + ':' + second; + this.value2 = y + '-' + m; }, + // 娣诲姞 hableadd() { - this.cateringList.push(this.form) - this.form = {} + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + this.timestampToTime(this.form.mTime) + this.form.mDate = this.time + this.form.userId = this.userId + this.form.userName = this.userName + eictmemo(this.form).then(res => { + if (res.code == 200) { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.form = {} + this.monthdon() + } + }) + } else { + this.timestampToTime(this.form.mTime) + this.form.mDate = this.time + this.form.userId = this.userId + this.form.userName = this.userName + memo(this.form).then(res => { + if (res.code == 200) { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.form = {} + this.monthdon() + } + }) + } + } + }); }, cancel() { this.open = false }, + hablecon() { + this.form = {} + }, submitForm() { }, - handleDelete1(row) { - this.cateringList.splice(row, 1) + handleUpdate(row) { + this.form = row + this.title = "淇敼鏃ヨ鍒�" }, - - + handleDelete1(row) { + let id = row.id + delememo(id).then(res => { + if (res.code == 200) { + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + this.monthdon() + } + }) + }, } } </script> @@ -242,4 +360,24 @@ input[type='number'] { -moz-appearance: textfield; } + +.main-cd .is-selected .el-tooltip { + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; +} + +.el-calendar-table .el-calendar-day { + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 8px; + height: 92px; + position: relative; + + text-align: justify; + + overflow: hidden; +} </style> \ No newline at end of file diff --git a/src/views/paiban/gerenpaiban/index.vue b/src/views/paiban/gerenpaiban/index.vue index de62a93..9cec9fd 100644 --- a/src/views/paiban/gerenpaiban/index.vue +++ b/src/views/paiban/gerenpaiban/index.vue @@ -1,280 +1,412 @@ <template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - - <el-form-item label="鍖荤敓濮撳悕" prop="proName"> - <el-input v-model="queryParams.proName" placeholder="璇疯緭鍏ュ尰鐢熷鍚�" clearable @keyup.enter.native="handleQuery" /> - </el-form-item> - <el-form-item label="鐧昏鏃堕棿"> - <el-date-picker clearable v-model="createTimeList" style="width: 240px" value-format="yyyy-MM-dd" - type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" - :picker-options="pickerOptions"></el-date-picker> - </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-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['hosp:rules:add']">鏂板 - </el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['hosp:rules:edit']">淇敼 - </el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['hosp:rules:remove']">鍒犻櫎 - </el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table border v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="搴忓彿" align="center" prop="newID" width="55" /> - <el-table-column label="鍖荤敓濮撳悕" align="center" prop="name" /> - <el-table-column label="鎬у埆" align="center" prop="sex" :show-overflow-tooltip="true"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.tj_rule_sex" :value="scope.row.sex" /> - </template> - </el-table-column> - <el-table-column label="鎺掔彮鏃ユ湡" align="center" prop="time" /> - <el-table-column label="鏄熸湡" align="center" prop="week" /> - <el-table-column label="涓婂崍/涓嬪崍" align="center" prop="daty" /> - <el-table-column label="鍑鸿瘖绉戝" align="center" prop="dept" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['hosp:rules:edit']" title="淇敼"> - </el-button> - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - v-hasPermi="['hosp:rules:remove']" title="鍒犻櫎"> - </el-button> - </template> - </el-table-column> - </el-table> - - <div class="pag"> - <div class="pag1"> - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" @pagination="getList" /> - </div> - </div> - - <!-- 娣诲姞鎴栦慨鏀硅鍒�+鐥呯瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true"> - <el-form-item label="鍖荤敓濮撳悕" prop="name"> - <el-input v-model="form.name" placeholder="璇疯緭鍏ュ勾榫�-" style="width:200px" /> + <div class="app-container"> + <el-row :gutter="20"> + <el-col :span="7" :xs="24"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> + <el-form-item label="绉戝" prop="deptName"> + <el-input v-model="queryParams.deptName" placeholder="璇疯緭鍏ョ瀹�" clearable style="width: 200px" /> </el-form-item> - <el-form-item label="鎬у埆" prop="sex"> - <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆" style="width:200px"> - <el-option v-for="dict in dict.type.tj_rule_sex" :key="dict.value" :label="dict.label" - :value="dict.value"></el-option> + <el-form-item label="鍖诲笀" prop="userName"> + <el-input v-model="queryParams.userName" placeholder="璇疯緭鍏ュ尰甯�" clearable style="width: 200px" /> + </el-form-item> + <el-form-item label="浜哄憳鍒嗙被" prop="userName"> + <el-select v-model="queryParams.roleId" placeholder="璇疯緭鍏ユ寕鍙风被鍒�" clearable style="width: 160px"> + <el-option v-for="dict in roleList" :key="dict.roleId" :label="dict.roleName" + :value="dict.roleId" /> </el-select> </el-form-item> - <el-form-item label="鎺掔彮鏃ユ湡" prop="time"> - <el-input v-model="form.time" placeholder="璇疯緭鍏ユ帓鐝棩鏈�" style="width:200px" /> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> </el-form-item> - <el-form-item label="鏄熸湡" prop="week"> - <el-input v-model="form.week" placeholder="璇疯緭鍏ユ槦鏈�" style="width:200px" /> - </el-form-item> - <el-form-item label="涓婂崍/涓嬪崍" prop="daty"> - <el-input v-model="form.daty" placeholder="璇疯緭鍏ヤ笂鍗�/涓嬪崍" style="width:200px" /> - </el-form-item> - <el-form-item label="鍑鸿瘖绉戝" prop="dept"> - <el-input v-model="form.dept" placeholder="璇疯緭鍏ュ嚭璇婄瀹�" style="width:200px" /> - </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> - </div> - </el-dialog> - </div> - </template> - - <script> - import { - - } from "@/api/hosp/rules"; - - export default { - name: "Rules", - dicts: ["tj_rule_sex"], - data() { - return { - dataList:[{ - newID:1, - name:"灏忓紶", - sex:"1", - dept:"澶栫", - time:"2023-11-15", - daty:"鍏ㄥぉ", - week:"鏄熸湡浜�" - }], - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - createTimeList: null, - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - ageGt: [ - { required: true, message: "椤圭洰鍚嶄笉鑳戒负绌�", trigger: "change" }, - ], - }, - pickerOptions: { - shortcuts: [ - { - text: "杩戜竴鍛�", - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "杩戜竴涓湀", - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "杩戜笁涓湀", - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); - picker.$emit("pick", [start, end]); - }, - }, - ], - }, - }; - }, - watch: { - - - }, - created() { - this.getNowTime(); - this.getList(); - }, - methods: { - //澶勭悊榛樿閫変腑褰撳墠鏃ユ湡 - getNowTime() { - var curDate = new Date().getTime(); - var dayNum = 3 * 24 * 3600 * 1000; - var threeDays = curDate - dayNum; - var sDay = this.getLocalTime(threeDays); - var end = this.getLocalTime(curDate); - this.finishTimeList = [sDay, end]; - }, - add0(m) { - return m < 10 ? "0" + m : m; - }, - getLocalTime(nS) { - var time = new Date(nS); - var y = time.getFullYear(); - var m = time.getMonth() + 1; - var d = time.getDate(); - return y + "-" + this.add0(m) + "-" + this.add0(d); - }, + <el-table border v-loading="loading" ref="tab" :data="timeConfigList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="50" align="center" /> + <el-table-column label="鍖诲笀" align="center" prop="userName" width="120"> + </el-table-column> + <el-table-column label="绉戝" align="center" prop="deptName" width="100" /> + <!-- <el-table-column + label="鑱岀О" + align="center" + prop="cftitle" + width="100" + /> --> + <el-table-column label="鏈�澶ф帓鐝棩鏈�" align="center" prop="time" /> + <el-table-column width="50" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-delete" @click="tingzhen(scope.row)" + v-hasPermi="['mall:timeConfig:remove']" title="鍒犻櫎"> + </el-button> + </template> + </el-table-column> + </el-table> - getList() { - this.loading = false + <div class="pag"> + <div class="pag1"> + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" @pagination="getList" /> + </div> + </div> + </el-col> + <el-col :span="17"> + <el-form :model="form" :rules="rules" ref="queryForm" size="small" :inline="true" label-width="80px"> + <el-form-item label="鎺掔彮绫诲埆" prop="numType"> + <el-select v-model="form.numType" placeholder="璇疯緭鍏ユ寕鍙风被鍒�" clearable style="width: 160px"> + <el-option v-for="dict in dict.type.yuyue_num_type" :key="dict.value" :label="dict.label" + :value="dict.value" /> + </el-select> + </el-form-item> + <el-form-item label="鎺掔彮闄愬彿" prop="allNum"> + <el-input v-model="form.allNum" placeholder="璇疯緭鍏ラ绾﹂檺鍙�" clearable style="width: 160px" /> + </el-form-item> + <el-form-item label="鎺掔彮鏃ユ湡" prop="createTimeList"> + <!-- <el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions" + style="width: 300px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" + value-format="yyyy-MM-dd" @change="dateChangebirthday1"> + </el-date-picker> --> + <el-date-picker v-model="startTime" type="date" placeholder="閫夋嫨鏃ユ湡" :picker-options="pickerOptionsStart" + style="width: 160px"> + </el-date-picker> + <el-date-picker v-model="endTime" type="date" placeholder="閫夋嫨鏃ユ湡" :picker-options="pickerOptionsEnd" + style="width: 160px" @change="dateChangebirthday1"> + </el-date-picker> + </el-form-item> + <el-form-item label="涓婂崍/涓嬪崍"> + <el-radio-group v-model="morA"> + <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-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="Scheduling">鐢熸垚鎺掔彮</el-button> + <el-button type="primary" icon="el-icon-search" size="mini" :disabled="disabled" + @click="SaveRoster">淇濆瓨鎺掔彮</el-button> + </el-form-item> + </el-form> + <el-table border v-loading="loading" :data="SchedulingList" height="620"> + <el-table-column type="selection" width="50" align="center" /> + + <el-table-column label="搴忓彿" width="55" align="center" prop="newID" /> + <el-table-column label="鍖诲笀" width="100" align="center" prop="userName" /> + <el-table-column label="鏃ユ湡" align="center" prop="time"> + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.time, "{y}-{m}-{d}") }}</span> + </template> + </el-table-column> + <el-table-column label="鏄熸湡" align="center" prop="week"> + </el-table-column> + <el-table-column label="涓婂崍/涓嬪崍" align="center" prop="morA"> + </el-table-column> + <el-table-column label="鎺掔彮绫诲埆" align="center" prop="numType"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.yuyue_num_type" :value="scope.row.numType" /> + </template> + </el-table-column> + <el-table-column label="鍑鸿瘖绉戝" align="center" prop="deptName" /> + <el-table-column label="鍖诲笀" align="center" prop="userName" /> + <el-table-column label="鎺掔彮闄愬彿" align="center" prop="allNum"> + <template slot-scope="scope"> + <el-input v-model="scope.row.allNum" @change="changeInput" placeholder="璇疯緭鍏ュ唴瀹�" + style="height: 23px; line-height: 23px"></el-input> + </template> + </el-table-column> + <el-table-column width="80" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" + v-hasPermi="['mall:timeConfig:remove']" title="鍒犻櫎"> + </el-button> + </template> + </el-table-column> + </el-table> + </el-col> + </el-row> + </div> +</template> + +<script> +import { + getUserList, + getScheduling, + timeConfig, + updateIsClose, + roleList +} from "@/api/mall/timeConfig"; + +export default { + name: "TimeConfig", + dicts: ["yuyue_num_type"], + data() { + return { + yc: false, + // pickerOptions: { + // disabledDate: (date) => { + // return date.getTime() < Date.now() - 24 * 60 * 60 * 1000; // 鍙�夋湭鏉ュぉ銆佸彲閫夊綋鍓嶅ぉ銆佷笉鍙�夊巻鍙插ぉ; + // }, + // }, + startTime: "", //寮�濮嬫棩鏈� + pickerOptionsStart: { + disabledDate: (date) => { + let minDate = new Date(this.startTime).getTime(); //鎷垮埌杈撳叆鐨勫紑濮嬫棩鏈� + return ( + date.getTime() < Date.now() - 24 * 60 * 60 * 1000 || + date.getTime() < minDate + ); // 鍙�夋湭鏉ュぉ銆佸彲閫夊綋鍓嶅ぉ銆佷笉鍙�夊巻鍙插ぉ; + }, + // disabledDate: (time) => { + // let maxDate = new Date(this.endTime).getTime()//鎷垮埌杈撳叆鐨勭粨鏉熸棩鏈� + // return time.getTime() > maxDate //鍒ゆ柇澶т簬缁撴潫鏃ユ湡 杩斿洖true 绂佺敤 + // } }, - - - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); + endTime: "", //缁撴潫鏃ユ湡 + pickerOptionsEnd: { + disabledDate: (time) => { + let minDate = new Date(this.startTime).getTime(); //鎷垮埌杈撳叆鐨勫紑濮嬫棩鏈� + return ( + time.getTime() < minDate || + time.getTime() < Date.now() - 24 * 60 * 60 * 1000 + ); //鍒ゆ柇灏忎簬寮�濮嬫棩鏈� 杩斿洖true 绂佺敤 + }, }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - - }; - this.resetForm("form"); + time: "", + disabled: true, + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 棰勭害鏃堕棿琛ㄦ牸鏁版嵁 + timeConfigList: [], + morA: 0, + morAList: [ + { + value: "涓婂崍", + dict: 1 + }, + { + value: "涓嬪崍", + dict: 2 + }, + { + value: "鍏ㄥぉ", + dict: 3 + }, + ], + SchedulingList: [], + // 鏌ヨ鍙傛暟 + queryParams: { + userName: null, + deptName: null, + roleId: null, + pageNum: 1, + pageSize: 10, }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); + // 琛ㄥ崟鍙傛暟 + form: {}, + dataList: [], + roleList: [], + // 琛ㄥ崟鏍¢獙 + rules: { + startTime: [ + { + required: true, + message: "寮�濮嬫棩鏈熶笉鑳戒负绌�", + trigger: "blur", + }, + ], + endTime: [ + { + required: true, + message: "缁撴潫鏃ユ湡涓嶈兘涓虹┖", + trigger: "blur", + }, + ], + allNum: [ + { + required: true, + message: "鎬绘暟涓嶈兘涓虹┖", + trigger: "blur", + }, + ], + allNum: [ + { + required: true, + message: "棰勭害闄愬彿涓嶈兘涓虹┖", + trigger: "blur", + }, + ], + numType: [ + { + required: true, + message: "鍙风被涓嶈兘涓虹┖", + trigger: "blur", + }, + ], }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map((item) => item.aid); - this.single = selection.length !== 1; - this.multiple = !selection.length; - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.open = true - }, - - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.open = true - this.form = row - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - - }, + }; + }, + created() { + this.getList(); + }, + methods: { + dateChangebirthday1(val) { + if (val == null) { + this.endTime = " "; + } else { + let times = new Date(this.endTime).getTime(); + var time = new Date(times); + var y = time.getFullYear(); + var m = time.getMonth() + 1; + var d = time.getDate(); + this.endTime = y + "-" + m + "-" + d; + } }, - }; - </script> - <style scoped> - .pag { - width: 100%; - display: flex; - justify-content: center; - } - - .pag1 { - width: 30%; - } - </style> - \ No newline at end of file + /** 鏌ヨ棰勭害鏃堕棿鍒楄〃 */ + getList() { + this.loading = true; + getUserList().then((response) => { + this.timeConfigList = response.data.voList; + this.total = response.data.total; + this.loading = false; + }); + roleList().then(res => { + this.roleList =res.rows + }) + }, + + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + getUserList(this.queryParams).then((response) => { + this.timeConfigList = response.data.voList; + this.total = response.data.total; + }); + }, + + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.dataList = selection; + this.dataList.forEach((element) => { + if (element.time) { + let date = new Date(element.time).getTime(); + let time = date + 24 * 60 * 60 * 1000; + const dt = new Date(time); + const y = dt.getFullYear(); + const m = (dt.getMonth() + 1 + "").padStart(2, "0"); + const d = (dt.getDate() + "").padStart(2, "0"); + this.startTime = y + "-" + m + "-" + d; + return this.startTime; + } else if (element.time == null) { + this.startTime = ""; + // let date = new Date(this.startTime).getTime(); + let date = Date.now() - 24 * 60 * 60 * 1000; + let time = date + 24 * 60 * 60 * 1000; + const dt = new Date(time); + const y = dt.getFullYear(); + const m = (dt.getMonth() + 1 + "").padStart(2, "0"); + const d = (dt.getDate() + "").padStart(2, "0"); + this.startTime = y + "-" + m + "-" + d; + return this.startTime; + } + }); + this.ids = selection.map((item) => item.id); + }, + + Scheduling() { + if (this.dataList.length >= 1) { + if (this.form.allNum && this.form.numType) { + if (this.endTime) { + // let mallSchedulingTimeDto = { + // allNum: this.form.allNum, + // deptId: this.dataList[0].deptId, + // deptName: this.dataList[0].deptName, + // numType: this.form.numType, + // endTime: this.endTime, + // startTime: this.startTime, + // morA: this.morA, + // userId: this.dataList[0].userId, + // userName: this.dataList[0].userName, + // }; + this.dataList.forEach(item => { + item.allNum=this.form.allNum, + item.numType= this.form.numType, + item.endTime= this.endTime, + item.startTime= this.startTime, + item.morA= this.morA + }) + getScheduling(this.dataList).then((res) => { + this.disabled = false; + this.SchedulingList = res.data; + this.SchedulingList.forEach((item, index) => { + item.newID = + (this.queryParams.pageNum - 1) * this.queryParams.pageSize + + index + + 1; + }); + }); + } else { + this.$modal.msgError("璇烽�夋嫨鏃堕棿娈�"); + } + } else { + this.$modal.msgError("璇峰~鍐欏甫鏄�"); + } + } else { + this.$modal.msgError("璇烽�夋嫨鍖荤敓"); + } + }, + + SaveRoster() { + let mallSchedulingTimes = this.SchedulingList; + timeConfig(mallSchedulingTimes).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("淇濆瓨鎴愬姛"); + this.getList(); + } + }); + }, + + changeInput(val) { + console.log(val); + }, + + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + this.SchedulingList.forEach((item, index) => { + if (item == row) { + this.SchedulingList.splice(index, 1); + } + }); + }, + tingzhen(row) { + let MallSchedulingTime = row; + console.log(MallSchedulingTime); + updateIsClose(MallSchedulingTime).then((response) => { + console.log(response); + }); + }, + }, +}; +</script> +<style scoped> +.el-input--medium .el-input__inner { + height: 24px; + line-height: 24px; +} + +.pag { + width: 140%; + display: flex; + justify-content: center; +} + +.pag1 { + width: 20%; +} +</style> \ No newline at end of file diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index b911338..ba8d368 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -104,6 +104,13 @@ @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']" >鍒犻櫎</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-share" + @click="handledetails(scope.row)" + v-hasPermi="['system:notice:remove']" + >璇︽儏</el-button> </template> </el-table-column> </el-table> @@ -164,6 +171,22 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </el-dialog> + + <!--閫氱煡鍏憡璇︽儏 --> + <el-dialog :title="formIn.noticeTitle" :visible.sync="openDetail" width="800px" append-to-body> + <div style="margin-top:-20px;margin-bottom:10px;"> + <el-tag size="mini" effect="dark" type="warning" v-if="form.noticeType==2">鍏憡</el-tag> + <el-tag size="mini" effect="dark" v-else>閫氱煡</el-tag> + <span style="margin-left:20px;">{{formIn.createTime}}</span> + </div> + <div class="content"> + <div v-html="formIn.noticeContent" style="margin-left:0px;margin-right:76px" class="ql-editor"></div> + </div> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="cancel"> 鍏� 闂� </el-button> + </div> + </el-dialog> + </div> </template> @@ -177,6 +200,7 @@ return { // 閬僵灞� loading: true, + openDetail:false, // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -201,6 +225,7 @@ createBy: undefined, status: undefined }, + formIn:{}, // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 @@ -230,6 +255,7 @@ // 鍙栨秷鎸夐挳 cancel() { this.open = false; + this.openDetail = false, this.reset(); }, // 琛ㄥ崟閲嶇疆 @@ -275,6 +301,11 @@ this.title = "淇敼鍏憡"; }); }, + + handledetails(row){ + this.formIn = row; + this.openDetail = true; + }, /** 鎻愪氦鎸夐挳 */ submitForm: function() { this.$refs["form"].validate(valid => { diff --git a/vue.config.js b/vue.config.js index 7282017..aa3ca2f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,9 +36,9 @@ // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { //target: `https://ltpeis.xaltjdkj.cn:5501/prod-api/getInfo`, - // target: `http://192.168.0.100:5011`, + target: `http://192.168.0.100:5011`, // // target: `http://192.168.0.99:8080/ltkj-admin`, - target: `https://ltpeis.xaltjdkj.cn:5011/ltkj-admin`, + // target: `https://ltpeis.xaltjdkj.cn:5011/ltkj-admin`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' -- Gitblit v1.8.0