From d2e5a12e7b542e2d3eef15409bb1037324038b1b Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Tue, 24 Mar 2026 10:54:31 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=20=E8=BF=9B=E5=85=A5=E8=AF=95=E9=AA=8C=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=BB=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/form/drug/list.vue | 12 +++++++++++- src/views/business/form/nonTrial/list.vue | 12 +++++++++++- src/views/business/study/list.vue | 11 ++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/views/business/form/drug/list.vue b/src/views/business/form/drug/list.vue index 76e7852..81b3fe1 100644 --- a/src/views/business/form/drug/list.vue +++ b/src/views/business/form/drug/list.vue @@ -240,7 +240,17 @@ export default { }, enter(row){ this.saveSimpleLog({name:row.name+'('+row.sn+')',nameEn:row.name+'('+row.sn+')',jcmc:'进入麻精药表单',jcmcEn:'Enter Controlled Drug'}) - this.$tab.openPage(" ", '/drug/enter/' + row.id+'/ytbd') + // this.$tab.openPage(" ", '/drug/enter/' + row.id+'/ytbd') + + let path = '/drug/enter/' + row.id+'/ytbd' + let index = _.findIndex(this.$store.state.tagsView.visitedViews, (tab) => { + return tab.path === path + }) + if (index > -1) { + this.$tab.refreshPage(this.$store.state.tagsView.visitedViews[index]); + } else { + this.$tab.openPage(" ", path) + } // this.showType = 'enter' // this.$refs.enter.show(row) }, diff --git a/src/views/business/form/nonTrial/list.vue b/src/views/business/form/nonTrial/list.vue index 9bc69d7..40d60a4 100644 --- a/src/views/business/form/nonTrial/list.vue +++ b/src/views/business/form/nonTrial/list.vue @@ -240,7 +240,17 @@ export default { }, enter(row){ this.saveSimpleLog({name:row.name+'('+row.sn+')',nameEn:row.name+'('+row.sn+')',jcmc:'进入非试验表单',jcmcEn:'Enter Non-study'}) - this.$tab.openPage(" ", '/nonTrial/enter/' + row.id+'/ytbd') + // this.$tab.openPage(" ", '/nonTrial/enter/' + row.id+'/ytbd') + + let path = '/nonTrial/enter/' + row.id+'/ytbd' + let index = _.findIndex(this.$store.state.tagsView.visitedViews, (tab) => { + return tab.path === path + }) + if (index > -1) { + this.$tab.refreshPage(this.$store.state.tagsView.visitedViews[index]); + } else { + this.$tab.openPage(" ", path) + } // this.showType = 'enter' // this.$refs.enter.show(row) }, diff --git a/src/views/business/study/list.vue b/src/views/business/study/list.vue index f5619dc..e382394 100644 --- a/src/views/business/study/list.vue +++ b/src/views/business/study/list.vue @@ -239,7 +239,16 @@ export default { }, enter(row){ this.saveSimpleLog({name:row.name+'('+row.sn+')',nameEn:row.name+'('+row.sn+')',jcmc:'进入试验',jcmcEn:'Enter Study'}) - this.$tab.openPage(" ", '/study/enter/' + row.id+'/ytbd') + // this.$tab.openPage(" ", '/study/enter/' + row.id+'/ytbd') + let path = '/study/enter/' + row.id+'/ytbd' + let index = _.findIndex(this.$store.state.tagsView.visitedViews, (tab) => { + return tab.path === path + }) + if (index > -1) { + this.$tab.refreshPage(this.$store.state.tagsView.visitedViews[index]); + } else { + this.$tab.openPage(" ", path) + } // this.showType = 'enter' // this.$refs.enter.show(row) From 5ba3032697fc5fe2e01e70d39371be290198875d Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Tue, 24 Mar 2026 11:37:06 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=20=E9=AA=8C=E8=AF=81=E5=BB=B6=E8=BF=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/ruoyi.js | 74 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index 3de2d98..a5af056 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -13,12 +13,15 @@ export function parseTime(time, pattern) { if (typeof time === 'object') { date = time } else { - if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + if (typeof time === 'string' && /^[0-9]+$/.test(time)) { time = parseInt(time) } else if (typeof time === 'string') { - time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '') + time = time + .replace(new RegExp(/-/gm), '/') + .replace('T', ' ') + .replace(new RegExp(/\.[\d]{3}/gm), '') } - if ((typeof time === 'number') && (time.toString().length === 10)) { + if (typeof time === 'number' && time.toString().length === 10) { time = time * 1000 } date = new Date(time) @@ -35,7 +38,9 @@ export function parseTime(time, pattern) { const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { let value = formatObj[key] // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } + if (key === 'a') { + return ['日', '一', '二', '三', '四', '五', '六'][value] + } if (result.length > 0 && value < 10) { value = '0' + value } @@ -46,17 +51,24 @@ export function parseTime(time, pattern) { // 表单重置 export function resetForm(refName) { - if (this.$refs[refName]) { - this.$refs[refName].resetFields() - } + setTimeout(() => { + if (this.$refs[refName]) { + this.$refs[refName].resetFields() + } + }, 100) } // 添加日期范围 export function addDateRange(params, dateRange, propName) { let search = params - search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {} + search.params = + typeof search.params === 'object' && + search.params !== null && + !Array.isArray(search.params) + ? search.params + : {} dateRange = Array.isArray(dateRange) ? dateRange : [] - if (typeof (propName) === 'undefined') { + if (typeof propName === 'undefined') { search.params['beginTime'] = dateRange[0] search.params['endTime'] = dateRange[1] } else { @@ -69,11 +81,11 @@ export function addDateRange(params, dateRange, propName) { // 回显数据字典 export function selectDictLabel(datas, value) { if (value === undefined) { - return "" + return '' } var actions = [] Object.keys(datas).some((key) => { - if (datas[key].value == ('' + value)) { + if (datas[key].value == '' + value) { actions.push(datas[key].label) return true } @@ -86,19 +98,19 @@ export function selectDictLabel(datas, value) { // 回显数据字典(字符串、数组) export function selectDictLabels(datas, value, separator) { - if (value === undefined || value.length ===0) { - return "" + if (value === undefined || value.length === 0) { + return '' } if (Array.isArray(value)) { - value = value.join(",") + value = value.join(',') } var actions = [] - var currentSeparator = undefined === separator ? "," : separator + var currentSeparator = undefined === separator ? ',' : separator var temp = value.split(currentSeparator) Object.keys(value.split(currentSeparator)).some((val) => { var match = false Object.keys(datas).some((key) => { - if (datas[key].value == ('' + temp[val])) { + if (datas[key].value == '' + temp[val]) { actions.push(datas[key].label + currentSeparator) match = true } @@ -112,7 +124,9 @@ export function selectDictLabels(datas, value, separator) { // 字符串格式化(%s ) export function sprintf(str) { - var args = arguments, flag = true, i = 1 + var args = arguments, + flag = true, + i = 1 str = str.replace(/%s/g, function () { var arg = args[i++] if (typeof arg === 'undefined') { @@ -126,8 +140,8 @@ export function sprintf(str) { // 转换字符串,undefined,null等转化为"" export function parseStrEmpty(str) { - if (!str || str == "undefined" || str == "null") { - return "" + if (!str || str == 'undefined' || str == 'null') { + return '' } return str } @@ -185,25 +199,29 @@ export function handleTree(data, id, parentId, children) { } /** -* 参数处理 -* @param {*} params 参数 -*/ + * 参数处理 + * @param {*} params 参数 + */ export function tansParams(params) { let result = '' for (const propName of Object.keys(params)) { const value = params[propName] - var part = encodeURIComponent(propName) + "=" - if (value !== null && value !== "" && typeof (value) !== "undefined") { + var part = encodeURIComponent(propName) + '=' + if (value !== null && value !== '' && typeof value !== 'undefined') { if (typeof value === 'object') { for (const key of Object.keys(value)) { - if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') { + if ( + value[key] !== null && + value[key] !== '' && + typeof value[key] !== 'undefined' + ) { let params = propName + '[' + key + ']' - var subPart = encodeURIComponent(params) + "=" - result += subPart + encodeURIComponent(value[key]) + "&" + var subPart = encodeURIComponent(params) + '=' + result += subPart + encodeURIComponent(value[key]) + '&' } } } else { - result += part + encodeURIComponent(value) + "&" + result += part + encodeURIComponent(value) + '&' } } } From f8612855ff813afdb71001878d38b897fdc43950 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Tue, 24 Mar 2026 12:08:20 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:[=E9=A2=84=E5=A1=AB=E8=A1=A8=E5=8D=95bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/index.vue | 2 ++ src/views/business/study/comp/ytbd/Sh.vue | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f65883f..052da34 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -14,6 +14,8 @@ backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: 'center', + overflowY: 'auto', + overflowX: 'hidden', height: 'calc(100vh - 100px)' }" mode="vertical" diff --git a/src/views/business/study/comp/ytbd/Sh.vue b/src/views/business/study/comp/ytbd/Sh.vue index 733058e..fbc33e7 100644 --- a/src/views/business/study/comp/ytbd/Sh.vue +++ b/src/views/business/study/comp/ytbd/Sh.vue @@ -67,7 +67,7 @@ - +
@@ -184,18 +184,25 @@ export default { this.$emit('close') this.open = false }, - reset() { - this.form = { + resetApprove() { + this.formApprove = { id: null, - studyId: null, qmyy: null, remark: null, qmrmm: null } - this.resetForm("form") + this.resetForm("formApprove") + }, + resetReject() { + this.formReject = { + id: null, + qmyy: null, + remark: null, + qmrmm: null + } + this.resetForm("formReject") }, show(row) { - this.reset() this.$modal.loading() studyFormPre_info({ id: row.id }).then(response => { this.form = response.data @@ -207,6 +214,7 @@ export default { }) }, showApprove() { + this.resetApprove() this.formApprove.id = this.form.id this.openApprove = true }, @@ -226,6 +234,7 @@ export default { }) }, showReject() { + this.resetReject() this.formReject.id = this.form.id this.openReject = true }, From eedbc6ec5d1751a946ba9751867a70792a29bf32 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Tue, 24 Mar 2026 12:28:42 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix:[=E8=A1=A8=E5=8D=95=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/comps/template/comps/gsp/MJYLQSQD.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue index 9230d09..be18aa2 100644 --- a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue +++ b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue @@ -2,7 +2,8 @@