diff --git a/public/pic/egSignMan.png b/public/pic/egSignMan.png new file mode 100644 index 0000000..1e4d1d1 Binary files /dev/null and b/public/pic/egSignMan.png differ diff --git a/src/components/common/AcceptTemplate.vue b/src/components/common/AcceptTemplate.vue index b402106..d4013f8 100644 --- a/src/components/common/AcceptTemplate.vue +++ b/src/components/common/AcceptTemplate.vue @@ -3,25 +3,31 @@
尊敬的客户:
欢迎您来到长城体检中心进行CT检查,在检查之前,您需要知晓以下事宜:辐射有害健康,请远离电离辐射
1、人体受到放射线照射后,可能产生潜在的危害,产生有害的躯体效应和遗传效应,其中最敏感的器官或组织为:甲状腺、性腺、及胚胎组织。
2、孕妇原则上禁止CT检查,如果您是孕妇,在CT检查前,请告知工作人员。
3、如果您正处在备孕阶段,原则上我们不建议进行CT检查,请您提前告知工作人员。
4、CT检查时只允许一名受检者进入机房,无关人员不得在机房内停留。
5、建议受检者佩戴门诊部提供的防护用品,遮盖敏感部位。 家屋到扫描室外等候。
受检人签名:${signMan}
${signDate}
', + form: { + id: '', + displayName: "", + informedConsentTemplateFileContent: "" + }, + contentInit: '尊敬的客户:
欢迎您来到长城体检中心进行CT检查,在检查之前,您需要知晓以下事宜:辐射有害健康,请远离电离辐射
1、人体受到放射线照射后,可能产生潜在的危害,产生有害的躯体效应和遗传效应,其中最敏感的器官或组织为:甲状腺、性腺、及胚胎组织。
2、孕妇原则上禁止CT检查,如果您是孕妇,在CT检查前,请告知工作人员。
3、如果您正处在备孕阶段,原则上我们不建议进行CT检查,请您提前告知工作人员。
4、CT检查时只允许一名受检者进入机房,无关人员不得在机房内停留。
5、建议受检者佩戴门诊部提供的防护用品,遮盖敏感部位。 家屋到扫描室外等候。
受检人签名:${signMan}
${signDate}
', // 自定义工具栏配置 customToolbar: [ // 字体大小控制(关键配置) @@ -98,16 +109,16 @@ export default { // 清除格式 ["clean"] ], - designAble:true, - contentDesign:'', - acceptTemplateShow:false, // 预览 - contentShow:'', // 预览 + designAble: true, + contentDesign: '', + acceptTemplateShow: false, // 预览 + contentShow: '', // 预览 }; }, //创建组件后 created() { - this.content = this.contentInit + this.form.informedConsentTemplateFileContent = this.contentInit }, //挂载组件完成 @@ -117,40 +128,87 @@ export default { computed: { ...mapState(["window", "dict", "dialogWin"]), - divHeight(){ - return this.window.pageHeight - 120 + divHeight() { + return this.window.pageHeight - 120 }, - autosize(){ - let rows = Math.floor((this.window.pageHeight - 70 - 6)/20) - return { minRows: rows, maxRows: rows} - } + autosize() { + let rows = Math.floor((this.window.pageHeight - 105 - 6) / 20) + return { minRows: rows, maxRows: rows } + } }, // 方法 methods: { - btnOk() { - console.log('content', this.content) - //this.dialogWin.acceptTemplate = false + + getAcceptTempPalte(informedConsentTemplateId) { + if (informedConsentTemplateId) { + postapi('/api/app/InformedConsentTemplate/Get', { informedConsentTemplateId }) + .then(res => { + if (res.code > -1) { + this.form = res.data + } + }) + .finally(() => { + this.contentDesign = this.form.informedConsentTemplateFileContent + this.designAble = true + }) + } else { + this.form.id = '' + this.form.displayName = '' + this.btnInit() + } + }, + + btnOk() { + if (!this.form.displayName){ + this.$message.warning({ showClose: true, message: '模板名称不能为空' }) + return + }else if(!this.form.informedConsentTemplateFileContent) { + this.$message.warning({ showClose: true, message: '模板内容不能为空' }) + return + } + + let url = '/api/app/InformedConsentTemplate/Create' + if (this.form.id) { + url = '/api/app/InformedConsentTemplate/Update' + } + + // 保存时,刷新列表 + postapi(url, this.form) + .then(res => { + if (res.code > -1) { + if (!this.form.id && res.data?.id) this.form.id = res.data.id + } + }) + .finally(() => { + // 刷新父主件 + try { + this.refFun(this.form.id) + } catch (error) { + console.error('知情同意书模板 refFun', error) + } + }) + }, - btnInit(){ - this.content = this.contentInit + btnInit() { + this.form.informedConsentTemplateFileContent = this.contentInit this.contentDesign = this.contentInit this.designAble = true }, // 查看效果 - btnPreview(){ + btnPreview() { this.acceptTemplateShow = true - let signMan = '
'
+ let signDate = moment(new Date()).format('yyyy 年 MM 月 DD 日')
+ this.contentShow = this.form.informedConsentTemplateFileContent.replace('${signMan}', signMan).replace('${signDate}', signDate)
},
- btnDesign(){
- if(this.designAble){
- this.contentDesign = this.content.replace(/' '/g,' ')
- }else{
- this.content = this.contentDesign
+ btnDesign() {
+ if (this.designAble) {
+ this.contentDesign = this.form.informedConsentTemplateFileContent
+ } else {
+ this.form.informedConsentTemplateFileContent = this.contentDesign
}
this.designAble = !this.designAble
}
@@ -158,13 +216,11 @@ export default {
// 监听
watch: {
- "refParams.queueTimes": {
+ "refParams.brushTimes": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 模板 newVal: ${newVal}, oldVal: ${oldVal} `, this.refParams);
- if (newVal != oldVal) {
-
- }
+ if (newVal != oldVal) this.getAcceptTempPalte(this.refParams.id)
}
},
},
diff --git a/src/router/index.js b/src/router/index.js
index 3c9015f..2b2d115 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -183,6 +183,12 @@ const routes = [{
component: () =>
import ("../views/basic-dictionary/SampleContainer.vue"),
},
+ {
+ path: "/acceptTempPlate",
+ name: "知情同意书模板",
+ component: () =>
+ import ("../views/basic-dictionary/acceptTempPlateList.vue"),
+ },
{
path: "/customer-org-type",
name: "客户单位类别",
diff --git a/src/views/basic-dictionary/acceptTempPlateList.vue b/src/views/basic-dictionary/acceptTempPlateList.vue
new file mode 100644
index 0000000..84242b7
--- /dev/null
+++ b/src/views/basic-dictionary/acceptTempPlateList.vue
@@ -0,0 +1,369 @@
+
+