diff --git a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
index e388104..a434388 100644
--- a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
+++ b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
@@ -8,15 +8,17 @@
-
+
@@ -29,6 +31,7 @@ import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import SelectReagentDialog from "../../dialog/SelectReagentDialog.vue";
import { public_studyList } from '@/api/business/public/public';
+import { listData } from "@/api/system/dict/data"
export default {
name: "MJYLQSQD",
@@ -60,7 +63,6 @@ export default {
},
},
computed: {
-
// 备注表单配置
remarkConig() {
return [
@@ -94,28 +96,28 @@ export default {
SD: {
label: "template.gsp.MJYLQSQD.sd",
type: "input",
+ disabled:true,
fillType: "actFill",
},
sywzmc: {
label: "template.gsp.MJYLQSQD.sywzmc",
type: "select",
fillType: "actFill",
- otherCode: "sywzmcOther",
options: this.getDictOptions('business_sywzmc'),
},
gyjl: {
label: "template.gsp.MJYLQSQD.gyjl",
type: "select",
- fillType: "actFill",
otherCode: "gyjlOther",
- options: this.getDictOptions('business_gyjl'),
+ fillType: "actFill",
+ options: this.gyjlOptions,
},
xynd: {
label: "template.gsp.MJYLQSQD.xynd",
type: "select",
- fillType: "actFill",
otherCode: "xyndOther",
- options: this.getDictOptions('business_gynd'),
+ fillType: "actFill",
+ options: this.gyndOptions,
},
xyl: {
label: "template.gsp.MJYLQSQD.xyl",
@@ -162,13 +164,10 @@ export default {
}
},
]
- },
+ }
},
data() {
return {
- syId: null,
- bmId: null,
- sdId: null,
public_studyList: public_studyList,
searchForm: {
name: {
@@ -202,12 +201,76 @@ export default {
prop: 'createTime',
label: 'page.business.study.study.createDate',
}
- ]
+ ],
+ gyjlOptionsOld: [],
+ gyndOptionsOld: [],
+ gyjlOptions: [],
+ gyndOptions: []
};
},
+ created() {
+ this.getGyjl()
+ this.getGynd()
+ },
mounted() {
},
methods: {
+ onSelectBlur(val) {
+ if (val.key == 'sywzmc') {
+ let tmp = []
+ _.forEach(_.filter(this.gyjlOptionsOld, function (o) {
+ return o.remark.indexOf(val.value) > -1;
+ }), function (item) {
+ tmp.push({ label: item.dictLabel, value: item.dictValue })
+ })
+ this.gyjlOptions = tmp
+ this.gyndOptions = []
+ this.$refs.baseInfoRef.batchUpdateFormData({
+ gyjl: '',
+ xynd: '',
+ });
+ }
+ if (val.key == 'gyjl') {
+ let tmp = []
+ _.forEach(_.filter(this.gyndOptionsOld, function (o) {
+ return o.remark.indexOf(val.value) > -1;
+ }), function (item) {
+ tmp.push({ label: item.dictLabel, value: item.dictValue })
+ })
+ this.gyndOptions = tmp
+ this.$refs.baseInfoRef.batchUpdateFormData({
+ xynd: '',
+ });
+ }
+ },
+ //获取给药剂量
+ getGyjl() {
+ listData({
+ pageNum: 1,
+ pageSize: 999999,
+ dictType: 'business_gyjl',
+ status: 0
+ }).then(response => {
+ this.gyjlOptionsOld = response.rows
+ if (this.formData.sywzmc && this.formData.sywzmc !== '') {
+ this.onSelectBlur({ key: 'sywzmc', value: this.formData.sywzmc })
+ }
+ })
+ },
+ //获取给药浓度
+ getGynd() {
+ listData({
+ pageNum: 1,
+ pageSize: 999999,
+ dictType: 'business_gynd',
+ status: 0
+ }).then(response => {
+ this.gyndOptionsOld = response.rows
+ if (this.formData.gyjl && this.formData.gyjl !== '') {
+ this.onSelectBlur({ key: 'gyjl', value: this.formData.gyjl })
+ }
+ })
+ },
onDialogSubmit(selectedId, currentRow) {
console.log(JSON.stringify(currentRow))
//试验
@@ -216,9 +279,9 @@ export default {
syNo: currentRow.sn,
SD: currentRow.leaderName,
});
- this.syId = currentRow.id
- this.bmId = currentRow.deptId
- this.sdId = currentRow.leader
+ this.formData.syId = currentRow.id
+ this.formData.bmId = currentRow.deptId
+ this.formData.sdId = currentRow.leader
}
//部门
if (currentRow.type == 2) {
@@ -226,9 +289,9 @@ export default {
syNo: currentRow.deptName,
SD: currentRow.nickName,
});
- this.syId = ''
- this.bmId = currentRow.deptId
- this.sdId = currentRow.userId
+ this.formData.syId = ''
+ this.formData.bmId = currentRow.deptId
+ this.formData.sdId = currentRow.userId
}
this.$refs.selectReagentDialogRef.onCancel()
},
@@ -240,23 +303,18 @@ export default {
//获取已填写的表单数据
getFilledFormData() {
let content = this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
- content.syId = this.syId
- content.bmId = this.bmId
- content.sdId = this.sdId
+ content.syId = this.formData.syId
+ content.bmId = this.formData.bmId
+ content.sdId = this.formData.sdId
return content;
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "remarkRef"]);
- content.syId = this.syId
- content.bmId = this.bmId
- content.sdId = this.sdId
+ content.syId = this.formData.syId
+ content.bmId = this.formData.bmId
+ content.sdId = this.formData.sdId
return content;
- },
- async onSave() {
- const formData = await this.getFormData();
- // const formData = await this.$refs.stepTableRef.getFormData();
- console.log(formData, "formData")
- },
+ }
}
};