Browse Source

Merge branch 'lkf'

ouqian
memorylkf 1 month ago
parent
commit
b0905ecb99
9 changed files with 335 additions and 52 deletions
  1. +1
    -1
      src/components/Template/HandleFormItem.vue
  2. +93
    -46
      src/components/Template/Step.vue
  3. +46
    -0
      src/components/Template/StepComponents/b/jrry_b.vue
  4. +36
    -0
      src/components/Template/StepComponents/ry/jr.vue
  5. +36
    -0
      src/components/Template/StepComponents/ry/kb.vue
  6. +52
    -0
      src/components/Template/StepComponents/ry/kbsjgsp.vue
  7. +52
    -0
      src/components/Template/StepComponents/ry/kbyq.vue
  8. +18
    -5
      src/components/Template/StepComponents/ry/lx.vue
  9. +1
    -0
      src/views/business/template/list.vue

+ 1
- 1
src/components/Template/HandleFormItem.vue View File

@ -16,7 +16,7 @@
<el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple" <el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue"
:disabled="getDisabled()" :placeholder="getPlaceholder()" @remove-tag="onRemoveTag" :disabled="getDisabled()" :placeholder="getPlaceholder()" @remove-tag="onRemoveTag"
@visible-change="onSelectBlur" @change="onInputChange">
@visible-change="onSelectBlur" @change="onInputChange" filterable>
<el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value"> <el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value">
</el-option> </el-option>
</el-select> </el-select>

+ 93
- 46
src/components/Template/Step.vue View File

@ -12,7 +12,7 @@
<!-- 根据步骤类型显示对应的表单 --> <!-- 根据步骤类型显示对应的表单 -->
<!-- 根据步骤类型显示对应的表单 --> <!-- 根据步骤类型显示对应的表单 -->
<component class="flex1" :is="getStepComponent(step.type)" :formData="step.formData"
<component class="flex1" :sn="step.type" :is="getStepComponent(step.type)" :formData="step.formData"
@update="onFormUpdate(index, $event)" :ref="'stepCompRef_' + index"> @update="onFormUpdate(index, $event)" :ref="'stepCompRef_' + index">
</component> </component>
<div v-if="templateFillType === 'preFill'" class="step-header-item"> <div v-if="templateFillType === 'preFill'" class="step-header-item">
@ -56,6 +56,7 @@ import Jb from "./StepComponents/ry/jb.vue";//溶液-搅拌
import Jrjb from "./StepComponents/ry/jrjb.vue";//- import Jrjb from "./StepComponents/ry/jrjb.vue";//-
import Cs from "./StepComponents/ry/cs.vue";//- import Cs from "./StepComponents/ry/cs.vue";//-
import Sy from "./StepComponents/ry/sy.vue";//- import Sy from "./StepComponents/ry/sy.vue";//-
import Zy from "./StepComponents/ry/zy.vue";//-
import Dc from "./StepComponents/ry/dc.vue";//- import Dc from "./StepComponents/ry/dc.vue";//-
import Jd from "./StepComponents/ry/jd.vue";//- import Jd from "./StepComponents/ry/jd.vue";//-
import Jz from "./StepComponents/ry/jz.vue";//- import Jz from "./StepComponents/ry/jz.vue";//-
@ -73,53 +74,66 @@ import Fs from "./StepComponents/ry/fs.vue";//溶液-复苏
import Fb from "./StepComponents/ry/fb.vue";//- import Fb from "./StepComponents/ry/fb.vue";//-
import Zlfz from "./StepComponents/ry/zlfz.vue";//- import Zlfz from "./StepComponents/ry/zlfz.vue";//-
const stepTypes = [
{ label: '操作地点', value: 'czdd' },
{ label: '操作方法', value: 'czhj' },
{ label: '选择容器', value: 'xzrq' },
{ label: '加入溶液', value: 'jrry' },
{ label: '天平校验(单点)', value: 'tpjydd' },
{ label: '天平校验(双点)', value: 'tpjysd' },
{ label: '取用物质', value: 'qywz' },
{ label: '称量(非传值)', value: 'clfcz' },
{ label: '称量(传值)', value: 'clcz' },
{ label: '标定(体积)', value: 'bdtj' },
{ label: '标定(质量)', value: 'bdzl' },
{ label: '调节PH(传值)', value: 'tjphcz' },
{ label: '调节PH(非传值)', value: 'tjphfcz' },
{ label: '离心', value: 'lx' },
{ label: '恒温混匀', value: 'hwhy' },
{ label: '振摇混匀', value: 'zyhy' },
{ label: '涡旋混匀', value: 'wxhy' },
{ label: '颠倒混匀', value: 'ddhy' },
{ label: '研磨', value: 'ym' },
{ label: '搅拌', value: 'jb' },
{ label: '加热搅拌', value: 'jrjb' },
{ label: '超声', value: 'cs' },
{ label: '水浴', value: 'sy' },
{ label: '氮吹', value: 'dc' },
{ label: '解冻', value: 'jd' },
{ label: '静置', value: 'jz' },
{ label: '过滤(自动)', value: 'glzd' },
{ label: '过滤(手动)', value: 'glsd' },
{ label: '孵育', value: 'fy' },
{ label: '取出原药', value: 'qcyy' },
{ label: '复溶(多容器)', value: 'frdrq' },
{ label: '复溶', value: 'fr' },
{ label: '合并', value: 'hb' },
{ label: '染色', value: 'rs' },
{ label: '计数', value: 'js' },
{ label: '灭菌', value: 'mj' },
{ label: '复苏', value: 'fs' },
{ label: '封板', value: 'fb' },
// { label: '', value: 'zlfz' },
//
import kbyq from "./StepComponents/ry/kbyq.vue";//-
import kbsjgsp from "./StepComponents/ry/kbsjgsp.vue";//-/
import kb from "./StepComponents/ry/kb.vue";//-
import jr from "./StepComponents/ry/jr.vue";//-
//
//
import jrry_b from './StepComponents/b/jrry_b.vue';//-
//-使
import { public_templateStepList } from '@/api/business/public/public';
// const stepTypes = [
// { label: '', value: 'czdd' },
// { label: '', value: 'czhj' },
// { label: '', value: 'xzrq' },
// { label: '', value: 'jrry' },
// { label: '()', value: 'tpjydd' },
// { label: '()', value: 'tpjysd' },
// { label: '', value: 'qywz' },
// { label: '()', value: 'clfcz' },
// { label: '()', value: 'clcz' },
// { label: '()', value: 'bdtj' },
// { label: '()', value: 'bdzl' },
// { label: 'PH()', value: 'tjphcz' },
// { label: 'PH()', value: 'tjphfcz' },
// { label: '', value: 'lx' },
// { label: '', value: 'hwhy' },
// { label: '', value: 'zyhy' },
// { label: '', value: 'wxhy' },
// { label: '', value: 'ddhy' },
// { label: '', value: 'ym' },
// { label: '', value: 'jb' },
// { label: '', value: 'jrjb' },
// { label: '', value: 'cs' },
// { label: '', value: 'sy' },
// { label: '', value: 'zy' },
// { label: '', value: 'dc' },
// { label: '', value: 'jd' },
// { label: '', value: 'jz' },
// { label: '()', value: 'glzd' },
// { label: '()', value: 'glsd' },
// { label: '', value: 'fy' },
// { label: '', value: 'qcyy' },
// { label: '()', value: 'frdrq' },
// { label: '', value: 'fr' },
// { label: '', value: 'hb' },
// { label: '', value: 'rs' },
// { label: '', value: 'js' },
// { label: '', value: 'mj' },
// { label: '', value: 'fs' },
// { label: '', value: 'fb' },
// { label: '', value: 'zlfz' },
];
// ];
export default { export default {
inject: ['templateFillType'],
inject: ['templateFillType','templateData'],
name: 'Step', name: 'Step',
props: { props: {
formData: { formData: {
@ -130,7 +144,7 @@ export default {
data() { data() {
return { return {
stepSelectConfig: { stepSelectConfig: {
options: stepTypes,
options: [],
fillType: "preFill", fillType: "preFill",
placeholder: "请选择步骤类型" placeholder: "请选择步骤类型"
}, },
@ -164,6 +178,7 @@ export default {
Jrjb, Jrjb,
Cs, Cs,
Sy, Sy,
Zy,
Dc, Dc,
Jd, Jd,
Jz, Jz,
@ -180,6 +195,15 @@ export default {
Fs, Fs,
Fb, Fb,
Zlfz, Zlfz,
//
kbyq,
kbsjgsp,
kb,
jr,
//
//
jrry_b,
}, },
computed: { computed: {
stepComponentMap() { stepComponentMap() {
@ -207,6 +231,7 @@ export default {
'jb': 'Jb', 'jb': 'Jb',
'jrjb': 'Jrjb', 'jrjb': 'Jrjb',
'sy': 'Sy', 'sy': 'Sy',
'zy': 'Zy',
'cs': 'Cs', 'cs': 'Cs',
'dc': 'Dc', 'dc': 'Dc',
'jd': 'Jd', 'jd': 'Jd',
@ -224,6 +249,18 @@ export default {
'fs': 'Fs', 'fs': 'Fs',
'fb': 'Fb', 'fb': 'Fb',
'zlfz': 'Zlfz', 'zlfz': 'Zlfz',
//
'kbyq': 'kbyq',
'kbsjgsp': 'kbsjgsp',
'kb': 'kb',
'jr': 'jr',
// 'fz': 'fz',
//
//
'jrry_b': 'jrry_b',
'lx_b': 'lx',
} }
} }
return this.componentMap return this.componentMap
@ -242,6 +279,7 @@ export default {
// // // //
// this.addStep() // this.addStep()
// } // }
this.getStepList()
}, },
watch: { watch: {
// steps: { // steps: {
@ -263,6 +301,15 @@ export default {
} }
}, },
methods: { methods: {
getStepList(){
public_templateStepList({templateId:this.templateData.templateId}).then(response => {
let options = []
_.forEach(response.data,(item)=>{
options.push({ label: item.name, value: item.sn })
})
this.stepSelectConfig.options = options
});
},
isShowAddStep() { isShowAddStep() {
return this.templateFillType === 'preFill'; return this.templateFillType === 'preFill';
}, },

+ 46
- 0
src/components/Template/StepComponents/b/jrry_b.vue View File

@ -0,0 +1,46 @@
<!-- 加入溶液 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_jrry_b" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config: {
text1: {
label: "使用",
type: "text",
},
ytrq: {
fillType: "preFill",
type: "input",
},
yq: {
fillType: "actFill",
type: "yq",
},
text2: {
label: "仪器,按上表进行加液。",
type: "text",
},
reamrk: {
fillType: "actFill",
type: "input",
},
}
}]
}
},
}
</script>
<style lang="scss" scoped></style>

+ 36
- 0
src/components/Template/StepComponents/ry/jr.vue View File

@ -0,0 +1,36 @@
<!-- 加热 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_jr" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config:{
text1:{
label:"使用电炉进行加热至溶解。",
type:"text",
},
check:{
type:"checkbox",
fillType:"actFill",
},
}
}]
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 36
- 0
src/components/Template/StepComponents/ry/kb.vue View File

@ -0,0 +1,36 @@
<!-- 空白 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_kb" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config:{
sjsr:{
type:"input",
fillType:"actFill",
},
text1:{
label:"。",
type:"text",
}
}
}]
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 52
- 0
src/components/Template/StepComponents/ry/kbsjgsp.vue View File

@ -0,0 +1,52 @@
<!-- 空白试剂/供试品 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_kbsjgsp" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config:{
text1:{
label:"选择",
type:"text",
},
mmry:{
type:"input",
fillType:"preFill",
},
ry:{
type:"mix",
fillType:"actFill",
},
text2:{
label:",",
type:"text",
},
sjsr:{
type:"input",
fillType:"actFill",
},
text3:{
label:"。",
type:"text",
}
}
}]
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 52
- 0
src/components/Template/StepComponents/ry/kbyq.vue View File

@ -0,0 +1,52 @@
<!-- 空白仪器 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_kbyq" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config:{
text1:{
label:"选择",
type:"text",
},
mmyq:{
type:"input",
fillType:"preFill",
},
yq:{
type:"yq",
fillType:"actFill",
},
text2:{
label:",",
type:"text",
},
sjsr:{
type:"input",
fillType:"actFill",
},
text3:{
label:"。",
type:"text",
}
}
}]
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 18
- 5
src/components/Template/StepComponents/ry/lx.vue View File

@ -9,12 +9,18 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default { export default {
mixins: [stepMixins], mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'lx',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config: { config: {
text1: { text1: {
label: "使用离心机", label: "使用离心机",
@ -116,12 +122,19 @@ export default {
type: "button", type: "button",
buttonName: "开始", buttonName: "开始",
}, },
text9: {
type: "text",
label: "。",
},
} }
}] }]
if(this.sn==='lx_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
config[0].config.text9 = {
type: "text",
label: "。",
}
return config
} }
}, },
} }

+ 1
- 0
src/views/business/template/list.vue View File

@ -317,6 +317,7 @@ export default {
this.tableDialog.title = '表单配置' this.tableDialog.title = '表单配置'
this.tableDialog.sn = row.sn this.tableDialog.sn = row.sn
this.tableDialog.templateData.bdmc =this.$i18n.locale === 'zh_CN'? row.name:row.nameEn this.tableDialog.templateData.bdmc =this.$i18n.locale === 'zh_CN'? row.name:row.nameEn
this.tableDialog.templateData.templateId = row.id
this.tableDialog.visible = true this.tableDialog.visible = true
}, },
getList() { getList() {

Loading…
Cancel
Save