|
@@ -110,7 +110,7 @@
|
|
import api from '@api/cdss.js';
|
|
import api from '@api/cdss.js';
|
|
import InfoParagraph from './MedicineInfoPg';
|
|
import InfoParagraph from './MedicineInfoPg';
|
|
import config from '@api/config';
|
|
import config from '@api/config';
|
|
-import $ from 'jquery'
|
|
|
|
|
|
+import $ from 'jquery';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'AddMedicinePrompt',
|
|
name: 'AddMedicinePrompt',
|
|
@@ -170,16 +170,21 @@ export default {
|
|
fileList: [
|
|
fileList: [
|
|
{ required: true, message: '请上传文件', trigger: 'change' }
|
|
{ required: true, message: '请上传文件', trigger: 'change' }
|
|
],
|
|
],
|
|
- titleChange: [{
|
|
|
|
- validator: (rule, value, callback) => {
|
|
|
|
- if (!value.trim()) {
|
|
|
|
- callback(new Error('请输入'+this.titleChange.replace(":","")));
|
|
|
|
- } else {
|
|
|
|
- callback();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- trigger: 'change'
|
|
|
|
- },{ max: 30, message: '标题最多30字', trigger: 'change' }]
|
|
|
|
|
|
+ titleChange: [
|
|
|
|
+ // {
|
|
|
|
+ // validator: (rule, value, callback) => {
|
|
|
|
+ // if (!value.trim()) {
|
|
|
|
+ // callback(
|
|
|
|
+ // new Error('请输入' + this.titleChange.replace(':', ''))
|
|
|
|
+ // );
|
|
|
|
+ // } else {
|
|
|
|
+ // callback();
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // trigger: 'change'
|
|
|
|
+ // },
|
|
|
|
+ { max: 30, message: '标题最多30字', trigger: 'change' }
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
saveDisable: false, //保存按钮禁止点击
|
|
saveDisable: false, //保存按钮禁止点击
|
|
showDrop: false, //下拉框显示文字bug1774
|
|
showDrop: false, //下拉框显示文字bug1774
|
|
@@ -190,7 +195,7 @@ export default {
|
|
showConfirm: true,
|
|
showConfirm: true,
|
|
isSuccessUpload: 0, //是否上传成功 0: 不在上传 1: 上传过程中 2: 上传成功
|
|
isSuccessUpload: 0, //是否上传成功 0: 不在上传 1: 上传过程中 2: 上传成功
|
|
isShowTip: false,
|
|
isShowTip: false,
|
|
- showType: -1, // 1 诊断 2 药品 3检验套餐 4检验细项 5检查 6手术和操作
|
|
|
|
|
|
+ showType: -1, // 1 诊断 2 药品 3检验套餐 4检验细项 5检查 6检查子 7手术和操作
|
|
editCount: -1, // 页面会否被编辑 >0被编辑 =0 未编辑
|
|
editCount: -1, // 页面会否被编辑 >0被编辑 =0 未编辑
|
|
startCount: -1,
|
|
startCount: -1,
|
|
isSaveSuccess: false // 是否保存成功
|
|
isSaveSuccess: false // 是否保存成功
|
|
@@ -222,15 +227,16 @@ export default {
|
|
this.isEdit = isEdit;
|
|
this.isEdit = isEdit;
|
|
this.isCopy = isCopy;
|
|
this.isCopy = isCopy;
|
|
this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
|
|
this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
|
|
- (isEdit||isCopy) && this.changeWord(data);
|
|
|
|
- if(isCopy){
|
|
|
|
- const _this=this;
|
|
|
|
- setTimeout(()=>{
|
|
|
|
|
|
+ (isEdit || isCopy) && this.changeWord(data);
|
|
|
|
+ if (isCopy) {
|
|
|
|
+ const _this = this;
|
|
|
|
+ setTimeout(() => {
|
|
_this.handleClear();
|
|
_this.handleClear();
|
|
- },300)
|
|
|
|
-
|
|
|
|
|
|
+ }, 300);
|
|
}
|
|
}
|
|
- api.getTremList({ id: data.id }).then(res => {
|
|
|
|
|
|
+ api
|
|
|
|
+ .getTremList({ id: data.id })
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == '0') {
|
|
if (res.data.code == '0') {
|
|
const data = res.data.data;
|
|
const data = res.data.data;
|
|
if (this.form.typeId === 82 || this.form.typeId === 83) {
|
|
if (this.form.typeId === 82 || this.form.typeId === 83) {
|
|
@@ -249,7 +255,10 @@ export default {
|
|
this.form.titleChange =
|
|
this.form.titleChange =
|
|
data.type == 1
|
|
data.type == 1
|
|
? data.clinicalPathwayName
|
|
? data.clinicalPathwayName
|
|
- : data.type == 3 || data.type == 4 || data.type == 5 || data.type == 6
|
|
|
|
|
|
+ : data.type == 3 ||
|
|
|
|
+ data.type == 4 ||
|
|
|
|
+ data.type == 5 ||
|
|
|
|
+ data.type == 6
|
|
? data.noticeName
|
|
? data.noticeName
|
|
: '';
|
|
: '';
|
|
this.form.selectedTermName =
|
|
this.form.selectedTermName =
|
|
@@ -393,7 +402,7 @@ export default {
|
|
it = Object.assign(this.form.prags[i]);
|
|
it = Object.assign(this.form.prags[i]);
|
|
this.form.prags.splice(i - 1, 2, it, temp);
|
|
this.form.prags.splice(i - 1, 2, it, temp);
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- div.scrollTop = this.$refs.subForm[i-1].$el.offsetTop -48;
|
|
|
|
|
|
+ div.scrollTop = this.$refs.subForm[i - 1].$el.offsetTop - 48;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
if (i === this.form.prags.length - 1) {
|
|
if (i === this.form.prags.length - 1) {
|
|
@@ -462,15 +471,19 @@ export default {
|
|
let positionArr = positiontemp.reduce(function(a, b) {
|
|
let positionArr = positiontemp.reduce(function(a, b) {
|
|
return a.concat(b);
|
|
return a.concat(b);
|
|
}); // 所有被选中的值集合
|
|
}); // 所有被选中的值集合
|
|
- // console.log(positionArr, 'positionArr');
|
|
|
|
- // console.log(this.showType, '当前页的显示类型');
|
|
|
|
|
|
+ console.log(positionArr, 'positionArr');
|
|
|
|
+ console.log(this.showType, '当前页的显示类型');
|
|
let isVisFlag = positionArr.some(item => item === 2);
|
|
let isVisFlag = positionArr.some(item => item === 2);
|
|
let isDiagFlag = positionArr.some(item => item === 3);
|
|
let isDiagFlag = positionArr.some(item => item === 3);
|
|
- // console.log(isVisFlag, 'isVisFlag');
|
|
|
|
|
|
+ console.log(isVisFlag, 'isVisFlag是否显示');
|
|
if (
|
|
if (
|
|
- (this.showType == 3 || this.showType == 4 || this.showType == 5 || this.showType == 6) &&
|
|
|
|
|
|
+ (this.showType == 3 ||
|
|
|
|
+ this.showType == 4 ||
|
|
|
|
+ this.showType == 5 ||
|
|
|
|
+ this.showType == 6) &&
|
|
isVisFlag
|
|
isVisFlag
|
|
) {
|
|
) {
|
|
|
|
+ console.log('进入校验');
|
|
//若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
|
|
//若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
|
|
this.$refs.groups.clearValidate();
|
|
this.$refs.groups.clearValidate();
|
|
this.rules.titleChange.push({
|
|
this.rules.titleChange.push({
|
|
@@ -606,7 +619,9 @@ export default {
|
|
paramsAll.id = this.conceptId;
|
|
paramsAll.id = this.conceptId;
|
|
paramsAll.name = this.form.name;
|
|
paramsAll.name = this.form.name;
|
|
paramsAll.noticeName =
|
|
paramsAll.noticeName =
|
|
- types == 3 || types == 4 || types == 5 || types == 6 ? this.form.titleChange : '';
|
|
|
|
|
|
+ types == 3 || types == 4 || types == 5 || types == 6
|
|
|
|
+ ? this.form.titleChange
|
|
|
|
+ : '';
|
|
paramsAll.type = this.form.typeId;
|
|
paramsAll.type = this.form.typeId;
|
|
paramsAll.details = tempArr;
|
|
paramsAll.details = tempArr;
|
|
param = paramsAll;
|
|
param = paramsAll;
|
|
@@ -633,8 +648,10 @@ export default {
|
|
|
|
|
|
//保存编辑 接口
|
|
//保存编辑 接口
|
|
sendSaveOrEdit(param) {
|
|
sendSaveOrEdit(param) {
|
|
- this.isCopy&&(param.id=undefined);
|
|
|
|
- api.saveTermPrompts(param).then(res => {
|
|
|
|
|
|
+ this.isCopy && (param.id = undefined);
|
|
|
|
+ api
|
|
|
|
+ .saveTermPrompts(param)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code === '0') {
|
|
if (res.data.code === '0') {
|
|
this.isSuccessUpload = 0; // 修改文件上传状态为0
|
|
this.isSuccessUpload = 0; // 修改文件上传状态为0
|
|
this.warning(res.data.msg || '保存成功', 'success');
|
|
this.warning(res.data.msg || '保存成功', 'success');
|