Browse Source

feat: [步骤管理] 新增步骤

lkf
memorylkf 1 month ago
parent
commit
0924888464
7 changed files with 262 additions and 46 deletions
  1. +1
    -1
      src/components/Template/HandleFormItem.vue
  2. +84
    -45
      src/components/Template/Step.vue
  3. +36
    -0
      src/components/Template/StepComponents/ry/jr.vue
  4. +36
    -0
      src/components/Template/StepComponents/ry/kb.vue
  5. +52
    -0
      src/components/Template/StepComponents/ry/kbsjgsp.vue
  6. +52
    -0
      src/components/Template/StepComponents/ry/kbyq.vue
  7. +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"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue"
: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>
</el-select>

+ 84
- 45
src/components/Template/Step.vue View File

@ -56,6 +56,7 @@ import Jb from "./StepComponents/ry/jb.vue";//溶液-搅拌
import Jrjb from "./StepComponents/ry/jrjb.vue";//-
import Cs from "./StepComponents/ry/cs.vue";//-
import Sy from "./StepComponents/ry/sy.vue";//-
import Zy from "./StepComponents/ry/zy.vue";//-
import Dc from "./StepComponents/ry/dc.vue";//-
import Jd from "./StepComponents/ry/jd.vue";//-
import Jz from "./StepComponents/ry/jz.vue";//-
@ -73,53 +74,63 @@ import Fs from "./StepComponents/ry/fs.vue";//溶液-复苏
import Fb from "./StepComponents/ry/fb.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 { 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 {
inject: ['templateFillType'],
inject: ['templateFillType','templateData'],
name: 'Step',
props: {
formData: {
@ -130,7 +141,7 @@ export default {
data() {
return {
stepSelectConfig: {
options: stepTypes,
options: [],
fillType: "preFill",
placeholder: "请选择步骤类型"
},
@ -164,6 +175,7 @@ export default {
Jrjb,
Cs,
Sy,
Zy,
Dc,
Jd,
Jz,
@ -180,6 +192,12 @@ export default {
Fs,
Fb,
Zlfz,
//
kbyq,
kbsjgsp,
kb,
jr
//
},
computed: {
stepComponentMap() {
@ -207,6 +225,7 @@ export default {
'jb': 'Jb',
'jrjb': 'Jrjb',
'sy': 'Sy',
'zy': 'Zy',
'cs': 'Cs',
'dc': 'Dc',
'jd': 'Jd',
@ -224,6 +243,14 @@ export default {
'fs': 'Fs',
'fb': 'Fb',
'zlfz': 'Zlfz',
//
'kbyq': 'kbyq',
'kbsjgsp': 'kbsjgsp',
'kb': 'kb',
'jr': 'jr',
// 'fz': 'fz',
//
}
}
return this.componentMap
@ -242,6 +269,7 @@ export default {
// //
// this.addStep()
// }
this.getStepList()
},
watch: {
// steps: {
@ -263,6 +291,17 @@ export default {
}
},
methods: {
getStepList(){
debugger
public_templateStepList({templateId:this.templateData.templateId}).then(response => {
let options = []
_.forEach(response.data,(item)=>{
options.push({ label: item.name, value: item.sn })
})
debugger
this.stepSelectConfig.options = options
});
},
isShowAddStep() {
return this.templateFillType === 'preFill';
},

+ 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>

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

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

Loading…
Cancel
Save