diff --git a/package.json b/package.json index f73530f..14cabca 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "axios": "0.28.1", "clipboard": "2.0.8", "core-js": "3.37.1", + "crypto-js": "^4.2.0", "echarts": "5.4.0", "element-ui": "2.15.14", "file-saver": "2.0.5", diff --git a/src/api/business/home/home.js b/src/api/business/home/home.js new file mode 100644 index 0000000..9f4de41 --- /dev/null +++ b/src/api/business/home/home.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function home_count(query) { + return request({ + url: '/system/business/home/count', + method: 'get', + params: query + }) +} diff --git a/src/api/business/study/studyFormPre.js b/src/api/business/study/studyFormPre.js index 4ef2280..0d190d3 100644 --- a/src/api/business/study/studyFormPre.js +++ b/src/api/business/study/studyFormPre.js @@ -107,4 +107,32 @@ export function studyFormPre_updateBdnr(data) { method: 'post', data: data }) -} \ No newline at end of file +} + +//申请关闭 +export function studyFormPre_sqgb(data) { + return request({ + url: '/system/business/studyFormPre/sqgb', + method: 'post', + data: data + }) +} + +//同意关闭 +export function studyFormPre_tygb(data) { + return request({ + url: '/system/business/studyFormPre/tygb', + method: 'post', + data: data + }) +} + +//拒绝关闭 +export function studyFormPre_jjgb(data) { + return request({ + url: '/system/business/studyFormPre/jjgb', + method: 'post', + data: data + }) +} + diff --git a/src/assets/images/home-icon1.jpg b/src/assets/images/home-icon1.jpg new file mode 100644 index 0000000..d3ec8b4 Binary files /dev/null and b/src/assets/images/home-icon1.jpg differ diff --git a/src/lang/en.js b/src/lang/en.js index 4c12898..e69bcfe 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -1,3 +1,5 @@ +// 工作台-首页 +import home from './en/business/home/home' //系统管理 // 菜单管理 import menu from './en/system/menu' @@ -90,7 +92,7 @@ export default { signer: 'Signed By', signerUser: 'Signed User', signerPsw: 'Password', - qmyy: 'Purpose', + qmyy: 'Meaning of Signature', signTime: '签名时间', remark: 'Comment', reason: 'Reason', @@ -140,6 +142,7 @@ export default { template }, business: { + home: home, resource: { resource: resource, zcg: zcg, diff --git a/src/lang/en/business/form/form.js b/src/lang/en/business/form/form.js index d3a17da..4e21adb 100644 --- a/src/lang/en/business/form/form.js +++ b/src/lang/en/business/form/form.js @@ -18,6 +18,8 @@ export default { statusYtj: 'Submitted', statusYtg: 'Approved', statusWtg: 'Rejected', + statusDgb: 'To be closed', + statusYgb: 'Closed', audit: 'Approve', detail: 'Enter', diff --git a/src/lang/en/business/home/home.js b/src/lang/en/business/home/home.js new file mode 100644 index 0000000..4753b35 --- /dev/null +++ b/src/lang/en/business/home/home.js @@ -0,0 +1,9 @@ +export default { + jrxzbd: 'Recent Record', + ytjbd: 'Submitted', + dtjbd: 'Saved', + bzxzsy: 'Weekly New Study', + ywcsy: 'Completed Study', + + xttz: 'Notification' +} diff --git a/src/lang/en/business/resource/zcg.js b/src/lang/en/business/resource/zcg.js index e857632..e163c7d 100644 --- a/src/lang/en/business/resource/zcg.js +++ b/src/lang/en/business/resource/zcg.js @@ -1,32 +1,32 @@ export default { - ysbh: 'Locker', - jyr: 'Key User', - zt: 'Status', - jyz: 'In Use', - wjy: 'Not in Use', - plgh: 'Batch Return', - zcg: 'Locker', - ys1jyr: 'Key 1 User', - ys2jyr: 'Key 2 User', - glyj: 'Contained Substance', - ysff: 'Issue Key', - gh: 'Return', - ysgh: 'Return Key', - ysghts:'请确认是否归还以下钥匙', - ghr1Id:'Key 1 Returner', - ghr1mm:'Key 1 Returner Password', - ghr2Id:'Key 2 Returner', - ghr2mm:'Key 2 Returner Password', - jsr:'接收人', - jsrmm:'接收人密码', - qmyy:'Purpose', - remark:'Comment', - lqr1Id:'Key 1 Recipient', - lqr1mm:'Key 1 Recipient Password', - lqr2Id:'Key 2 Recipient', - lqr2mm:'Key 2 Recipient Password', - ffr:'Issuer', - ffrmm:'Issuer Password', - qysff:'Key Distribution', - qysgh:'Return Key' -} \ No newline at end of file + ysbh: 'Locker', + jyr: 'Key User', + zt: 'Status', + jyz: 'In Use', + wjy: 'Not in Use', + plgh: 'Batch Return', + zcg: 'Locker', + ys1jyr: 'Key 1 User', + ys2jyr: 'Key 2 User', + glyj: 'Contained Substance', + ysff: 'Issue Key', + gh: 'Return', + ysgh: 'Return Key', + ysghts: '请确认是否归还以下钥匙', + ghr1Id: 'Key 1 Returner', + ghr1mm: 'Key 1 Returner Password', + ghr2Id: 'Key 2 Returner', + ghr2mm: 'Key 2 Returner Password', + jsr: '接收人', + jsrmm: '接收人密码', + qmyy: 'Meaning of Signature', + remark: 'Comment', + lqr1Id: 'Key 1 Recipient', + lqr1mm: 'Key 1 Recipient Password', + lqr2Id: 'Key 2 Recipient', + lqr2mm: 'Key 2 Recipient Password', + ffr: 'Issuer', + ffrmm: 'Issuer Password', + qysff: 'Key Distribution', + qysgh: 'Return Key' +} diff --git a/src/lang/en/business/study/studyFormApply.js b/src/lang/en/business/study/studyFormApply.js index 714635d..7e88bb9 100644 --- a/src/lang/en/business/study/studyFormApply.js +++ b/src/lang/en/business/study/studyFormApply.js @@ -18,7 +18,7 @@ export default { bdnr: '表单内容', qmxx: 'Signature information', qmr: 'Signed By', - qmyy: 'Purpose', + qmyy: 'Meaning of Signature', qmsj: 'Date', bzyy: 'Comment/Reason', jcgj: 'Track Record', diff --git a/src/lang/en/business/study/studyFormFill.js b/src/lang/en/business/study/studyFormFill.js index da3e0bc..06394ce 100644 --- a/src/lang/en/business/study/studyFormFill.js +++ b/src/lang/en/business/study/studyFormFill.js @@ -26,7 +26,7 @@ export default { bdnr: '表单内容', qmxx: 'Signature information', qmr: 'Signed By', - qmyy: 'Purpose', + qmyy: 'Meaning of Signature', qmsj: 'Date', bzyy: 'Comment/Reason', jcgj: 'Track Record', @@ -71,5 +71,5 @@ export default { smxz: 'Declaration of Collaboration', bcsm: 'Additional Remark', fztgjj: '废止通过/拒绝', - ysy: 'Reviewed', + ysy: 'Reviewed' } diff --git a/src/lang/en/business/study/studyFormPlan.js b/src/lang/en/business/study/studyFormPlan.js index 5843f4e..6f25798 100644 --- a/src/lang/en/business/study/studyFormPlan.js +++ b/src/lang/en/business/study/studyFormPlan.js @@ -15,7 +15,7 @@ export default { bdnr: '表单内容', qmxx: 'Signature information', qmr: 'Signed By', - qmyy: 'Purpose', + qmyy: 'Meaning of Signature', qmsj: 'Date', bzyy: 'Comment/Reason', jcgj: 'Track Record', diff --git a/src/lang/en/business/study/studyFormPre.js b/src/lang/en/business/study/studyFormPre.js index 3baa4dd..bbbbc4b 100644 --- a/src/lang/en/business/study/studyFormPre.js +++ b/src/lang/en/business/study/studyFormPre.js @@ -19,7 +19,7 @@ export default { bdnr: '表单内容', qmxx: 'Signature information', qmr: 'Signed By', - qmyy: 'Purpose', + qmyy: 'Meaning of Signature', qmsj: 'Date', bzyy: 'Comment/Reason', jcgj: 'Track Record', @@ -35,5 +35,9 @@ export default { fzyybd: 'Copy Existing Preset', yes: 'Yes', no: 'No', - zztjyzbd: 'Submit Record Preset' + zztjyzbd: 'Submit Record Preset', + sqgb: 'Apply Close', + qrgb: 'Confirm Close', + gbtgjj:'Close Approve/Reject', + guanbi:'Close' } diff --git a/src/lang/en/business/study/studyMethod.js b/src/lang/en/business/study/studyMethod.js index 33e5bb7..002fcd6 100644 --- a/src/lang/en/business/study/studyMethod.js +++ b/src/lang/en/business/study/studyMethod.js @@ -1,20 +1,20 @@ export default { - ffmc: 'Name', - cjr: 'Creator', - cjsj: 'Creation Date', - scff: 'Upload', - scwj: 'Upload File', - wjm:'Allowed Format: .pdf', - zt: 'Status', - yuedu: 'Read', - daochu: 'Download', - mc: 'Name', - ff: 'Method', - qmhz: '签名汇总', - yidu: 'Read', - weidu: 'Unread', - qmr: 'Signed By', - qmsj: 'Date', - qmyy: 'Purpose', - remark: 'Comment', -} \ No newline at end of file + ffmc: 'Name', + cjr: 'Creator', + cjsj: 'Creation Date', + scff: 'Upload', + scwj: 'Upload File', + wjm: 'Allowed Format: .pdf', + zt: 'Status', + yuedu: 'Read', + daochu: 'Download', + mc: 'Name', + ff: 'Method', + qmhz: '签名汇总', + yidu: 'Read', + weidu: 'Unread', + qmr: 'Signed By', + qmsj: 'Date', + qmyy: 'Meaning of Signature', + remark: 'Comment' +} diff --git a/src/lang/zh.js b/src/lang/zh.js index 35f4bc1..bb4faa0 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -1,3 +1,5 @@ +// 工作台-首页 +import home from './zh/business/home/home' //系统管理 // 菜单管理 import menu from './zh/system/menu' @@ -135,6 +137,7 @@ export default { template }, business: { + home: home, resource: { resource: resource, zcg: zcg, diff --git a/src/lang/zh/business/form/form.js b/src/lang/zh/business/form/form.js index d60dc2b..4b1941c 100644 --- a/src/lang/zh/business/form/form.js +++ b/src/lang/zh/business/form/form.js @@ -18,7 +18,9 @@ export default { statusYtj: '已提交', statusYtg: '已通过', statusWtg: '未通过', - + statusDgb: '待关闭', + statusYgb: '已关闭', + audit: '审核', detail: '表单详情', //填报表单 diff --git a/src/lang/zh/business/home/home.js b/src/lang/zh/business/home/home.js new file mode 100644 index 0000000..ab6d702 --- /dev/null +++ b/src/lang/zh/business/home/home.js @@ -0,0 +1,9 @@ +export default { + jrxzbd: '今日新增表单', + ytjbd: '已提交表单', + dtjbd: '待提交表单', + bzxzsy: '本周新增试验', + ywcsy: '已完成试验', + + xttz: '系统通知' +} diff --git a/src/lang/zh/business/study/studyFormPre.js b/src/lang/zh/business/study/studyFormPre.js index 02e8853..207d91a 100644 --- a/src/lang/zh/business/study/studyFormPre.js +++ b/src/lang/zh/business/study/studyFormPre.js @@ -36,5 +36,9 @@ export default { fzyybd: '复制已有表单', yes: '是', no: '否', - zztjyzbd: '制作提交预制表单' + zztjyzbd: '制作提交预制表单', + sqgb: '申请关闭', + qrgb: '确认关闭', + gbtgjj:'关闭通过/拒绝', + guanbi:'关闭' } diff --git a/src/utils/encryptUtil.js b/src/utils/encryptUtil.js new file mode 100644 index 0000000..9a1d8ce --- /dev/null +++ b/src/utils/encryptUtil.js @@ -0,0 +1,36 @@ +const CRYPTOJSKEY = '7LrjnqHv2mS5Qr5s' +import CryptoJS from 'crypto-js' +export function encrypt(plaintText) { + var plaintText = plaintText + var options = { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + } + var key = CryptoJS.enc.Utf8.parse(CRYPTOJSKEY) + var encryptedData = CryptoJS.AES.encrypt(plaintText, key, options) + var encryptedBase64Str = encryptedData.toString().replace(/\//g, '_') + encryptedBase64Str = encryptedBase64Str.replace(/\+/g, '-') + return encryptedBase64Str +} +export function decrypt(encryptedText) { + // 还原 URL 安全字符 + let encryptedBase64Str = encryptedText + .replace(/_/g, '/') // 还原 _ + .replace(/-/g, '+') // 还原 - + // 补充末尾的 =(如果需要) + const mod4 = encryptedBase64Str.length % 4 + if (mod4) { + encryptedBase64Str += '='.repeat(4 - mod4) + } + try { + const key = CryptoJS.enc.Utf8.parse(CRYPTOJSKEY) + const decrypt = CryptoJS.AES.decrypt(encryptedBase64Str, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }) + return CryptoJS.enc.Utf8.stringify(decrypt).toString() + } catch (e) { + console.error('解密失败:', e) + return null + } +} diff --git a/src/utils/index.js b/src/utils/index.js index fd3e206..7df6a5d 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,5 +1,5 @@ import { parseTime } from './ruoyi' - +import { encrypt,decrypt } from '@/utils/encryptUtil' /** * 表格时间格式化 */ @@ -390,11 +390,11 @@ export function isNumberStr(str) { // 编码 export function caesarCipher(str) { - return btoa(btoa(str)) + return btoa(encrypt(str)) } // 解码 export function caesarDecipher(str) { - return atob(atob(str)); + return decrypt(atob(str)); } diff --git a/src/views/business/form/drug/comp/tbbdList.vue b/src/views/business/form/drug/comp/tbbdList.vue index 17990e3..2f19a81 100644 --- a/src/views/business/form/drug/comp/tbbdList.vue +++ b/src/views/business/form/drug/comp/tbbdList.vue @@ -321,7 +321,7 @@ export default { studyId: this.searchForm.studyId, formId: null })) - this.$tab.openPage("新增表单", '/drug/formFillBj/' + params) + this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/drug/formFillBj/' + params) }, edit(row) { // this.showEdit = true diff --git a/src/views/business/form/drug/comp/ytbdList.vue b/src/views/business/form/drug/comp/ytbdList.vue index 494972e..b727b96 100644 --- a/src/views/business/form/drug/comp/ytbdList.vue +++ b/src/views/business/form/drug/comp/ytbdList.vue @@ -71,6 +71,8 @@ {{ $t('page.business.form.statusTbz') }} {{ $t('page.business.form.statusYtj') }} {{ $t('page.business.form.statusYtg') }} + {{ $t('page.business.form.statusDgb') }} + {{ $t('page.business.form.statusYgb') }} @@ -102,6 +104,12 @@ {{ $t('page.business.form.audit') }} + + {{ $t('page.business.study.studyFormPre.guanbi') }} + + + {{ $t('page.business.study.studyFormPre.qrgb') }} + @@ -116,6 +124,10 @@ + + + + @@ -183,6 +195,8 @@ import TemplateTable from '@/views/business/comps/template/TemplateTable'; import Bj from "@/views/business/study/comp/ytbd/Bj"; import Xq from "@/views/business/study/comp/ytbd/Xq"; import Sh from "@/views/business/study/comp/ytbd/Sh"; +import Gb from "@/views/business/study/comp/ytbd/Gb"; +import Qrgb from "@/views/business/study/comp/ytbd/Qrgb"; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import Sign from './sign.vue' import moment from "moment"; @@ -218,7 +232,7 @@ export default { deep: true } }, - components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable, Sign }, + components: { Qrgb,Gb,Bj, Xq, Sh, SelectDeptUser, TemplateTable, Sign }, data() { return { formCount: 0, @@ -409,7 +423,12 @@ export default { this.$emit('showDetail', this.showAudit) this.$refs.Sh.show(row) }, - + gb(row) { + this.$refs.Gb.show(row) + }, + qrgb(row) { + this.$refs.Qrgb.show(row) + }, sdsy() { this.$modal.loading() drug_checkSd({ diff --git a/src/views/business/form/nonTrial/comp/tbbdList.vue b/src/views/business/form/nonTrial/comp/tbbdList.vue index bcddce3..736a207 100644 --- a/src/views/business/form/nonTrial/comp/tbbdList.vue +++ b/src/views/business/form/nonTrial/comp/tbbdList.vue @@ -322,7 +322,7 @@ export default { studyId: this.searchForm.studyId, formId: null })) - this.$tab.openPage("新增表单", '/nonTrial/formFillBj/' + params) + this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/nonTrial/formFillBj/' + params) }, edit(row) { // this.showEdit = true diff --git a/src/views/business/form/nonTrial/comp/ytbdList.vue b/src/views/business/form/nonTrial/comp/ytbdList.vue index 447b16d..c5a52b3 100644 --- a/src/views/business/form/nonTrial/comp/ytbdList.vue +++ b/src/views/business/form/nonTrial/comp/ytbdList.vue @@ -72,6 +72,8 @@ {{ $t('page.business.form.statusTbz') }} {{ $t('page.business.form.statusYtj') }} {{ $t('page.business.form.statusYtg') }} + {{ $t('page.business.form.statusDgb') }} + {{ $t('page.business.form.statusYgb') }} @@ -103,6 +105,12 @@ {{ $t('page.business.form.audit') }} + + {{ $t('page.business.study.studyFormPre.guanbi') }} + + + {{ $t('page.business.study.studyFormPre.qrgb') }} + @@ -117,6 +125,10 @@ + + + + @@ -184,6 +196,8 @@ import TemplateTable from '@/views/business/comps/template/TemplateTable'; import Bj from "@/views/business/study/comp/ytbd/Bj"; import Xq from "@/views/business/study/comp/ytbd/Xq"; import Sh from "@/views/business/study/comp/ytbd/Sh"; +import Gb from "@/views/business/study/comp/ytbd/Gb"; +import Qrgb from "@/views/business/study/comp/ytbd/Qrgb"; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import Sign from './sign.vue' import moment from "moment"; @@ -219,7 +233,7 @@ export default { deep: true } }, - components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable, Sign }, + components: { Qrgb,Gb,Bj, Xq, Sh, SelectDeptUser, TemplateTable, Sign }, data() { return { formCount: 0, @@ -410,6 +424,12 @@ export default { this.$emit('showDetail', this.showAudit) this.$refs.Sh.show(row) }, + gb(row) { + this.$refs.Gb.show(row) + }, + qrgb(row) { + this.$refs.Qrgb.show(row) + }, sdsy() { this.$modal.loading() nonTrial_checkSd({ diff --git a/src/views/business/study/comp/tbbdList.vue b/src/views/business/study/comp/tbbdList.vue index a55d84e..307add3 100644 --- a/src/views/business/study/comp/tbbdList.vue +++ b/src/views/business/study/comp/tbbdList.vue @@ -329,7 +329,7 @@ export default { studyId: this.searchForm.studyId, id:null })) - this.$tab.openPage("新增表单", '/study/formFillBj/'+params) + this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/study/formFillBj/'+params) }, edit(row) { // this.showEdit = true @@ -340,7 +340,6 @@ export default { studyId: this.searchForm.studyId, formId:row.id })) - debugger this.$tab.openPage(row.bdmc, '/study/formFillBj/' +params) }, bjClose() { diff --git a/src/views/business/study/comp/ytbd/Bj.vue b/src/views/business/study/comp/ytbd/Bj.vue index c196d4d..3f8bf4b 100644 --- a/src/views/business/study/comp/ytbd/Bj.vue +++ b/src/views/business/study/comp/ytbd/Bj.vue @@ -138,7 +138,7 @@ diff --git a/src/views/business/study/comp/ytbd/Qrgb.vue b/src/views/business/study/comp/ytbd/Qrgb.vue new file mode 100644 index 0000000..9835b2a --- /dev/null +++ b/src/views/business/study/comp/ytbd/Qrgb.vue @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/study/comp/ytbdList.vue b/src/views/business/study/comp/ytbdList.vue index 0c09825..3510d8f 100644 --- a/src/views/business/study/comp/ytbdList.vue +++ b/src/views/business/study/comp/ytbdList.vue @@ -69,6 +69,8 @@ {{ $t('page.business.form.statusYtj') }} {{ $t('page.business.form.statusYtg') }} {{ $t('page.business.form.statusWtg') }} + {{ $t('page.business.form.statusDgb') }} + {{ $t('page.business.form.statusYgb') }} @@ -100,6 +102,14 @@ {{ $t('page.business.form.audit') }} + + {{ $t('page.business.study.studyFormPre.guanbi') + }} + + + {{ $t('page.business.study.studyFormPre.qrgb') + }} + @@ -114,6 +124,11 @@ + + + + + @@ -178,6 +193,8 @@ import TemplateTable from '@/views/business/comps/template/TemplateTable'; import Bj from "./ytbd/Bj"; import Xq from "./ytbd/Xq"; import Sh from "./ytbd/Sh"; +import Gb from "./ytbd/Gb"; +import Qrgb from "./ytbd/Qrgb"; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import moment from "moment"; import { mapGetters } from 'vuex' @@ -211,7 +228,7 @@ export default { deep: true } }, - components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable }, + components: { Gb, Qrgb, Bj, Xq, Sh, SelectDeptUser, TemplateTable }, data() { return { isMatchSubject: false, @@ -378,7 +395,7 @@ export default { edit(row) { this.showEdit = true this.$emit('showDetail', this.showEdit) - this.$refs.Bj.edit(row) + this.$refs.Bj.edit(_.merge({}, row, { permitForSecectUser: 'business:studyFormPre:sh' })) }, bjClose() { this.showEdit = false @@ -400,6 +417,12 @@ export default { this.$emit('showDetail', this.showDetail) this.$refs.Xq.show(row, false) }, + gb(row) { + this.$refs.Gb.show(row) + }, + qrgb(row) { + this.$refs.Qrgb.show(row) + }, audit(row) { this.showAudit = true this.$emit('showDetail', this.showAudit) diff --git a/src/views/index.vue b/src/views/index.vue index 21ac3e5..5aa30c0 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,21 +1,137 @@ - {{ $t('system.title') }} + + + + + + + + {{count.formTodayCount}} + {{$t('page.business.home.jrxzbd')}} + + + + + + + + {{count.formYtjCount}} + {{$t('page.business.home.ytjbd')}} + + + + + + + + {{count.formTbzCount}} + {{$t('page.business.home.dtjbd')}} + + + + + + + + {{count.studyFinishCount}} + {{$t('page.business.home.bzxzsy')}} + + + + + + + + {{count.studyWeekCount}} + {{$t('page.business.home.ywcsy')}} + + + + + + + +