Browse Source

Merge branch 'master' into ouqian

ouqian
ouqian 1 month ago
parent
commit
c28a76fd76
49 changed files with 2097 additions and 261 deletions
  1. +24
    -0
      src/api/business/storageLocation/storageLocation.js
  2. +74
    -50
      src/components/Template/BaseInfoFormPackage.vue
  3. +13
    -11
      src/components/Template/CustomTable.vue
  4. +172
    -74
      src/components/Template/HandleFormItem.vue
  5. +130
    -46
      src/components/Template/Step.vue
  6. +43
    -0
      src/components/Template/StepComponents/b/cl.vue
  7. +46
    -0
      src/components/Template/StepComponents/b/jrry_b.vue
  8. +14
    -1
      src/components/Template/StepComponents/ry/cs.vue
  9. +14
    -1
      src/components/Template/StepComponents/ry/dc.vue
  10. +14
    -1
      src/components/Template/StepComponents/ry/ddhy.vue
  11. +14
    -1
      src/components/Template/StepComponents/ry/fr.vue
  12. +14
    -1
      src/components/Template/StepComponents/ry/fy.vue
  13. +14
    -1
      src/components/Template/StepComponents/ry/glsd.vue
  14. +14
    -1
      src/components/Template/StepComponents/ry/glzd.vue
  15. +14
    -1
      src/components/Template/StepComponents/ry/hwhy.vue
  16. +14
    -1
      src/components/Template/StepComponents/ry/jb.vue
  17. +14
    -1
      src/components/Template/StepComponents/ry/jd.vue
  18. +36
    -0
      src/components/Template/StepComponents/ry/jr.vue
  19. +14
    -1
      src/components/Template/StepComponents/ry/jrjb.vue
  20. +14
    -1
      src/components/Template/StepComponents/ry/jz.vue
  21. +36
    -0
      src/components/Template/StepComponents/ry/kb.vue
  22. +52
    -0
      src/components/Template/StepComponents/ry/kbsjgsp.vue
  23. +52
    -0
      src/components/Template/StepComponents/ry/kbyq.vue
  24. +18
    -5
      src/components/Template/StepComponents/ry/lx.vue
  25. +14
    -1
      src/components/Template/StepComponents/ry/sy.vue
  26. +14
    -1
      src/components/Template/StepComponents/ry/wxhy.vue
  27. +14
    -1
      src/components/Template/StepComponents/ry/zy.vue
  28. +14
    -1
      src/components/Template/StepComponents/ry/zyhy.vue
  29. +59
    -28
      src/components/Template/mixins/formPackageMixins.js
  30. +7
    -2
      src/lang/en.js
  31. +13
    -0
      src/lang/en/system/storageLocation.js
  32. +14
    -0
      src/lang/en/template/xb.js
  33. +7
    -1
      src/lang/zh.js
  34. +13
    -0
      src/lang/zh/system/storageLocation.js
  35. +14
    -0
      src/lang/zh/template/xb.js
  36. +3
    -0
      src/utils/index.js
  37. +1
    -1
      src/utils/menu.js
  38. +1
    -1
      src/views/business/comps/select/BusinessSelect.vue
  39. +8
    -1
      src/views/business/comps/template/TemplateTable.vue
  40. +336
    -0
      src/views/business/comps/template/comps/xb/XB001.vue
  41. +20
    -2
      src/views/business/comps/template/comps/yp/YP003.vue
  42. +4
    -7
      src/views/business/comps/template/formConfig/sp/SP0019.js
  43. +361
    -0
      src/views/business/comps/template/formConfig/xb/xb001.js
  44. +3
    -0
      src/views/business/comps/template/mixins/templateMixin.js
  45. +7
    -7
      src/views/business/resource/sj/comps/Bj.vue
  46. +2
    -2
      src/views/business/resource/yq/comps/detail.vue
  47. +7
    -7
      src/views/business/resource/yq/list.vue
  48. +296
    -0
      src/views/business/storageLocation/list.vue
  49. +1
    -0
      src/views/business/template/list.vue

+ 24
- 0
src/api/business/storageLocation/storageLocation.js View File

@ -0,0 +1,24 @@
import request from '@/utils/request'
export function storageLocation_list(query) {
return request({
url: '/system/business/storageLocation/list',
method: 'get',
params: query
})
}
export function storageLocation_add(data) {
return request({
url: '/system/business/storageLocation/save',
method: 'post',
data: data
})
}
export function storageLocation_edit(data) {
return request({
url: '/system/business/storageLocation/edit',
method: 'post',
data: data
})
}

+ 74
- 50
src/components/Template/BaseInfoFormPackage.vue View File

@ -84,22 +84,33 @@
:error="errors[key]" @update:error="errors[key] = false" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" /> :orange-bg="orangeBgFields[key]" />
</div> </div>
<div v-else-if="sItem.type === 'select'">
<div v-else-if="sItem.type === 'select'" class = "flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="select" :item="sItem" v-model="formFields[key]" @copy="onCopy(sItem, key)" type="select" :item="sItem" v-model="formFields[key]" @copy="onCopy(sItem, key)"
@change="(e, type) => onSelectChange(key, e, type)" :error="errors[key]" @change="(e, type) => onSelectChange(key, e, type)" :error="errors[key]"
@update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" /> @update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" />
<div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div>
<div class="flex">
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)"
:item="getOtherItem(sItem)" v-model="formFields[sItem.otherCode]"
@copy="onCopy(sItem, key)" :error="errors[sItem.otherCode]"
@update:error="errors[sItem.otherCode] = false"
:orange-bg="orangeBgFields[sItem.otherCode]" />
</div>
</div>
</div> </div>
<div v-else-if="sItem.type === 'input'" class="item-center"> <div v-else-if="sItem.type === 'input'" class="item-center">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
@blur="onBlur(key, $event)" :item="sItem" v-model="formFields[key]" @blur="onBlur(key, $event)" :item="sItem" v-model="formFields[key]"
@copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false" @copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false"
:ref = "key"
:orange-bg="orangeBgFields[key]" />
:ref="key" :orange-bg="orangeBgFields[key]" />
<span v-if="sItem.subType === 'text'" class="sub-text">{{ $t(sItem.subText) }}</span> <span v-if="sItem.subType === 'text'" class="sub-text">{{ $t(sItem.subText) }}</span>
<HandleFormItem class="ml-10" v-else-if="sItem.subType === 'button'" type="button" :item="getButtonItem(sItem)"
:value="formFields[sItem.subKey]"
@clickButton="(e,val,data) => handleClickButton(e, sItem,val,data)" />
<HandleFormItem class="ml-10" v-else-if="sItem.subType === 'button'" type="button"
:item="getButtonItem(sItem)" :value="formFields[sItem.subKey]"
@clickButton="(e, val, data) => handleClickButton(e, sItem, val, data)" />
</div> </div>
<div v-else-if="sItem.type === 'textarea'"> <div v-else-if="sItem.type === 'textarea'">
@ -114,13 +125,7 @@
@update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="sItem" @update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="sItem"
:value="formFields[key]" /> :value="formFields[key]" />
</div> </div>
<div v-else-if="sItem.type === 'checkboxTag'" class="flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="checkboxTag" :item="sItem" :value="formFields[key]"
@copy="onCopy(sItem, key)" @change="(e) => onAttachmentChange(key, e)"
:error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" />
</div>
<div v-else-if="sItem.type === 'checkboxList'" class="flex1"> <div v-else-if="sItem.type === 'checkboxList'" class="flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="checkboxList" :item="sItem" :value="formFields[key]" type="checkboxList" :item="sItem" :value="formFields[key]"
@ -131,22 +136,20 @@
<div v-else-if="isRegent(sItem)" class="flex1"> <div v-else-if="isRegent(sItem)" class="flex1">
<HandleFormItem <HandleFormItem
@beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, key)" @beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, key)"
:field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" :type="sItem.type"
sourceFrom="baseInfoFormPackage" :error="errors[key]"
:field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
:type="sItem.type" sourceFrom="baseInfoFormPackage" :error="errors[key]"
@update:error="errors[key] = false" @update:error="errors[key] = false"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, key, sItem)" @onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, key, sItem)"
:item="sItem" :value="formFields[key]" /> :item="sItem" :value="formFields[key]" />
</div> </div>
<!-- 勾选某些选项时出现其他输入框 --> <!-- 勾选某些选项时出现其他输入框 -->
<div v-else-if="sItem.type === 'radioAndOther'" class="item-center"> <div v-else-if="sItem.type === 'radioAndOther'" class="item-center">
<HandleFormItem
:field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" type="radio"
:error="errors[key]"
@update:error="errors[key] = false"
@change="(e,type) => onSelectChange(key, e, type)"
:item="sItem" :value="formFields[key]" />
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="radio" :error="errors[key]" @update:error="errors[key] = false"
@change="(e, type) => onSelectChange(key, e, type)" :item="sItem"
:value="formFields[key]" />
<div v-show="isShowOtherByRadioAndOther(formFields[key], sItem)" class="flex1 ml-10"> <div v-show="isShowOtherByRadioAndOther(formFields[key], sItem)" class="flex1 ml-10">
<HandleFormItem :field-item-label="fieldItemLabel"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)" :field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)"
:item="getRadioOtherItem(sItem)" v-model="formFields[sItem.otherCode]" :item="getRadioOtherItem(sItem)" v-model="formFields[sItem.otherCode]"
@copy="onCopy(sItem, key)" :error="errors[sItem.otherCode]" @copy="onCopy(sItem, key)" :error="errors[sItem.otherCode]"
@ -154,6 +157,13 @@
:orange-bg="orangeBgFields[sItem.otherCode]" /> :orange-bg="orangeBgFields[sItem.otherCode]" />
</div> </div>
</div> </div>
<div v-else-if="sItem.type === 'fqyq'" class="flex1"
:class="{ 'form-error-border': errors[key] }">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="fqyq" :item="sItem" :value="formFields[key]"
@change="(e) => onFqyqChange(key, e)" :error="errors[key]"
@update:error="errors[key] = false" />
</div>
</div> </div>
@ -166,7 +176,8 @@
<div v-for="(sItem, key) in item.config" class="c-Item flex item-center" <div v-for="(sItem, key) in item.config" class="c-Item flex item-center"
:class="getSpanClass(sItem)" :key="key"> :class="getSpanClass(sItem)" :key="key">
<div class="step-form-title" <div class="step-form-title"
:style="{ 'width': sItem.labelWidth ? sItem.labelWidth + 'px' : '150px' }" v-if="sItem.label">
:style="{ 'width': sItem.labelWidth ? sItem.labelWidth + 'px' : '150px' }"
v-if="sItem.label">
{{ $t(sItem.label) }}</div> {{ $t(sItem.label) }}</div>
<div v-if="sItem.type === 'dateTime'" class="flex1"> <div v-if="sItem.type === 'dateTime'" class="flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
@ -198,14 +209,16 @@
@blur="onBlur(key, $event)" class="flex1" :item="sItem" v-model="formFields[key]" @blur="onBlur(key, $event)" class="flex1" :item="sItem" v-model="formFields[key]"
@copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false" @copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" /> :orange-bg="orangeBgFields[key]" />
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-if="sItem.subType === 'select'" type="select" :item="getSubItem(sItem)"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-if="sItem.subType === 'select'" type="select" :item="getSubItem(sItem)"
v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)" v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)"
@change="(e, type) => onSelectChange(sItem.subKey, e, type)" :error="errors[sItem.subKey]"
@update:error="errors[sItem.subKey] = false"
@change="(e, type) => onSelectChange(sItem.subKey, e, type)"
:error="errors[sItem.subKey]" @update:error="errors[sItem.subKey] = false"
:orange-bg="orangeBgFields[sItem.subKey]" /> :orange-bg="orangeBgFields[sItem.subKey]" />
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-if="sItem.subType === 'input'" type="input" :item="getSubItem(sItem)"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-if="sItem.subType === 'input'" type="input" :item="getSubItem(sItem)"
v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)" v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)"
:error="errors[sItem.subKey]" @blur="onBlur(sItem.subKey, $event)" :error="errors[sItem.subKey]" @blur="onBlur(sItem.subKey, $event)"
@update:error="errors[sItem.subKey] = false" @update:error="errors[sItem.subKey] = false"
@ -213,13 +226,15 @@
<div class="ml-10 item-span" v-else-if="sItem.subType === 'span'">{{ <div class="ml-10 item-span" v-else-if="sItem.subType === 'span'">{{
formFields[sItem.subKey] }}</div> formFields[sItem.subKey] }}</div>
<span v-else-if="sItem.subType === 'text'" class="sub-text">{{ $t(sItem.subText) }}</span> <span v-else-if="sItem.subType === 'text'" class="sub-text">{{ $t(sItem.subText) }}</span>
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-else-if="sItem.subType === 'clickable'" type="clickable"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-else-if="sItem.subType === 'clickable'" type="clickable"
@clickable="handleClickable(sItem, sItem.subKey)" :item="getClickableItem(sItem)" @clickable="handleClickable(sItem, sItem.subKey)" :item="getClickableItem(sItem)"
:error="errors[sItem.subKey]" @update:error="errors[sItem.subKey] = false" :error="errors[sItem.subKey]" @update:error="errors[sItem.subKey] = false"
@resetRecord="resetRecord(sItem.subKey)" :value="formFields[sItem.subKey]" /> @resetRecord="resetRecord(sItem.subKey)" :value="formFields[sItem.subKey]" />
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-else-if="isRegent(sItem, 'subType')" :type="sItem.subType"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-else-if="isRegent(sItem, 'subType')" :type="sItem.subType"
:item="getRegentItem(sItem, 'subType')" sourceFrom="baseInfoFormPackage" :item="getRegentItem(sItem, 'subType')" sourceFrom="baseInfoFormPackage"
@beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, sItem.subKey)" @beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, sItem.subKey)"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, sItem.subKey, sItem)" @onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, sItem.subKey, sItem)"
@ -248,22 +263,25 @@
@input="onInputNumberChange(key, $event)" :value="formFields[key]" @input="onInputNumberChange(key, $event)" :value="formFields[key]"
@copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false" @copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" /> :orange-bg="orangeBgFields[key]" />
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-if="sItem.subType === 'select'" type="select" :item="getSubItem(sItem)"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-if="sItem.subType === 'select'" type="select" :item="getSubItem(sItem)"
v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)" v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)"
@change="(e, type) => onSelectChange(sItem.subKey, e, type)" :error="errors[sItem.subKey]"
@update:error="errors[sItem.subKey] = false"
@change="(e, type) => onSelectChange(sItem.subKey, e, type)"
:error="errors[sItem.subKey]" @update:error="errors[sItem.subKey] = false"
:orange-bg="orangeBgFields[sItem.subKey]" /> :orange-bg="orangeBgFields[sItem.subKey]" />
<div class="ml-10 item-span" v-else-if="sItem.subType === 'span'">{{ <div class="ml-10 item-span" v-else-if="sItem.subType === 'span'">{{
formFields[sItem.subKey] }}</div> formFields[sItem.subKey] }}</div>
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-else-if="sItem.subType === 'clickable'"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-else-if="sItem.subType === 'clickable'"
@clickable="handleClickable(sItem, sItem.subKey)" :error="errors[sItem.subKey]" @clickable="handleClickable(sItem, sItem.subKey)" :error="errors[sItem.subKey]"
type="clickable" @update:error="errors[sItem.subKey] = false" type="clickable" @update:error="errors[sItem.subKey] = false"
@resetRecord="resetRecord(sItem.subKey)" :item="getClickableItem(sItem)" @resetRecord="resetRecord(sItem.subKey)" :item="getClickableItem(sItem)"
:value="formFields[sItem.subKey]" /> :value="formFields[sItem.subKey]" />
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + sItem.subKey"
class="ml-10" v-else-if="isRegent(sItem, 'subType')" sourceFrom="baseInfoFormPackage"
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-else-if="isRegent(sItem, 'subType')" sourceFrom="baseInfoFormPackage"
:error="errors[sItem.subKey]" :type="sItem.subType" :error="errors[sItem.subKey]" :type="sItem.subType"
@beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, sItem.subKey)" @beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, sItem.subKey)"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, sItem.subKey, sItem)" @onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, sItem.subKey, sItem)"
@ -275,12 +293,6 @@
@update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="sItem" @update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="sItem"
:value="formFields[key]" /> :value="formFields[key]" />
</div> </div>
<div v-else-if="sItem.type === 'checkboxTag'" class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="checkboxTag" :item="sItem" :value="formFields[key]" @copy="onCopy(sItem, key)"
@change="(e) => onAttachmentChange(key, e)" :error="errors[key]"
@update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" />
</div>
<div v-else-if="sItem.type === 'checkboxList'" class="flex flex1"> <div v-else-if="sItem.type === 'checkboxList'" class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="checkboxList" :item="sItem" :value="formFields[key]" @copy="onCopy(sItem, key)" type="checkboxList" :item="sItem" :value="formFields[key]" @copy="onCopy(sItem, key)"
@ -326,7 +338,7 @@
<script> <script>
import HandleFormItem from "./HandleFormItem.vue"; import HandleFormItem from "./HandleFormItem.vue";
import LineLabel from "./LineLabel.vue"; import LineLabel from "./LineLabel.vue";
import { isShowOther,isShowOtherByRadioAndOther } from "@/utils/formPackageCommon.js";
import { isShowOther, isShowOtherByRadioAndOther } from "@/utils/formPackageCommon.js";
import { isRegent } from "@/utils/index.js"; import { isRegent } from "@/utils/index.js";
import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js' import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js'
@ -378,9 +390,9 @@ export default {
this.$emit('beforeReagentSubmit', { selectData: data, callback, key, formFields: this.formFields }) this.$emit('beforeReagentSubmit', { selectData: data, callback, key, formFields: this.formFields })
}, },
// //
handleClickButton(e, item,val,data) {
handleClickButton(e, item, val, data) {
this.formFields[item.subKey] = val; this.formFields[item.subKey] = val;
this.$emit("clickButton", item,data)
this.$emit("clickButton", item, data)
}, },
// //
getButtonItem(sItem) { getButtonItem(sItem) {
@ -390,6 +402,11 @@ export default {
fillType: sItem.subFillType || sItem.fillType fillType: sItem.subFillType || sItem.fillType
} }
}, },
// fqyq
onFqyqChange(key, e) {
console.log(e, key, 'fqyq');
this.formFields[key] = e;
}
} }
} }
@ -552,4 +569,11 @@ export default {
.mr-20 { .mr-20 {
margin-right: 20px; margin-right: 20px;
} }
.form-error-border {
box-shadow: 0 0 6px #ffc3c3;
padding: 8px;
border-radius: 4px;
border: 1px solid #ff5d5d;
}
</style> </style>

+ 13
- 11
src/components/Template/CustomTable.vue View File

@ -216,7 +216,8 @@ import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus"; import { EventBus } from "@/utils/eventBus";
import { getuuid } from "@/utils/index.js"; import { getuuid } from "@/utils/index.js";
import { isRegent } from "@/utils/index.js"; import { isRegent } from "@/utils/index.js";
import moment from "moment";
import { isValueEmpty } from '@/utils/index.js';
import _ from "lodash"; import _ from "lodash";
export default { export default {
inject: ['templateFillType', 'getZdxgjl', 'updateZdxgjl'], inject: ['templateFillType', 'getZdxgjl', 'updateZdxgjl'],
@ -415,7 +416,7 @@ export default {
onCopy(rowIndex, col) { onCopy(rowIndex, col) {
if (col.copyFrom) { if (col.copyFrom) {
if (this.isValueEmpty(this.localDataSource[rowIndex][col.copyFrom])) {//
if (isValueEmpty(this.localDataSource[rowIndex][col.copyFrom])) {//
return return
} }
this.updateDataSourceByRowIndex(rowIndex, { [col.prop]: this.localDataSource[rowIndex][col.copyFrom] }, "clickable") this.updateDataSourceByRowIndex(rowIndex, { [col.prop]: this.localDataSource[rowIndex][col.copyFrom] }, "clickable")
@ -470,7 +471,7 @@ export default {
this.columns.forEach((col, colIndex) => { this.columns.forEach((col, colIndex) => {
if (col.headerSelectKey && col.headerOptions && col.fillType === this.templateFillType) { if (col.headerSelectKey && col.headerOptions && col.fillType === this.templateFillType) {
const headerValue = this.headerSelectFields[col.headerSelectKey]; const headerValue = this.headerSelectFields[col.headerSelectKey];
if (this.isValueEmpty(headerValue)) {
if (isValueEmpty(headerValue)) {
const errorItem = { const errorItem = {
rowIndex: -1, // rowIndex: -1, //
colIndex, colIndex,
@ -524,7 +525,7 @@ export default {
} }
} }
} else { } else {
if (this.isValueEmpty(mainValue) && !col.bodyDisabled && col.bodyType !== 'span' && col.bodyType !== 'button') {
if (isValueEmpty(mainValue) && !col.bodyDisabled && col.bodyType !== 'span' && col.bodyType !== 'button') {
const errorItem = { const errorItem = {
rowIndex, rowIndex,
colIndex, colIndex,
@ -540,7 +541,7 @@ export default {
if (col.bodySubKey && !col.bodySubDisabled && col.bodySubType !== 'span' && col.bodySubType !== "button") { if (col.bodySubKey && !col.bodySubDisabled && col.bodySubType !== 'span' && col.bodySubType !== "button") {
const subValue = row[col.bodySubKey]; const subValue = row[col.bodySubKey];
console.log(col, subValue, "subValue") console.log(col, subValue, "subValue")
if (this.isValueEmpty(subValue)) {
if (isValueEmpty(subValue)) {
const errorItem = { const errorItem = {
rowIndex, rowIndex,
colIndex, colIndex,
@ -563,7 +564,7 @@ export default {
return; return;
} }
const otherValue = row[col.otherCode]; const otherValue = row[col.otherCode];
if (this.isValueEmpty(otherValue)) {
if (isValueEmpty(otherValue)) {
const errorItem = { const errorItem = {
rowIndex, rowIndex,
colIndex, colIndex,
@ -636,7 +637,7 @@ export default {
this.columns.forEach((col, colIndex) => { this.columns.forEach((col, colIndex) => {
const currentValue = row[col.prop]; const currentValue = row[col.prop];
const compareToValue = row[col.compareTo]; const compareToValue = row[col.compareTo];
if (col.compareTo && !this.isValueEmpty(currentValue) && !this.isValueEmpty(compareToValue)) {
if (col.compareTo && !isValueEmpty(currentValue) && !isValueEmpty(compareToValue)) {
// compareTo // compareTo
if (!isEqual(currentValue, compareToValue)) { if (!isEqual(currentValue, compareToValue)) {
this.setOrangeBg(rowIndex, colIndex, col.prop, true); this.setOrangeBg(rowIndex, colIndex, col.prop, true);
@ -651,7 +652,7 @@ export default {
const currentValue = row[col.bodySubKey]; const currentValue = row[col.bodySubKey];
const compareToValue = row[col.bodySubCompareTo]; const compareToValue = row[col.bodySubCompareTo];
if (!this.isValueEmpty(currentValue) && !this.isValueEmpty(compareToValue)) {
if (!isValueEmpty(currentValue) && !isValueEmpty(compareToValue)) {
// compareTo // compareTo
if (!isEqual(currentValue, compareToValue)) { if (!isEqual(currentValue, compareToValue)) {
this.setOrangeBg(rowIndex, colIndex, col.bodySubKey, true); this.setOrangeBg(rowIndex, colIndex, col.bodySubKey, true);
@ -950,8 +951,8 @@ export default {
} }
.custom-table-body { .custom-table-body {
max-height: 500px;
overflow-y: auto;
/* max-height: 500px; */
/* overflow-y: auto; */
/* 可根据需要调整或由父组件控制 */ /* 可根据需要调整或由父组件控制 */
} }
@ -1034,7 +1035,8 @@ export default {
flex-direction: column; flex-direction: column;
max-width: 100%; max-width: 100%;
/* 父容器决定宽度 */ /* 父容器决定宽度 */
overflow-x: auto;
overflow: auto;
max-height: 500px;
} }
.custom-table-header, .custom-table-header,

+ 172
- 74
src/components/Template/HandleFormItem.vue View File

@ -16,13 +16,14 @@
<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>
<el-checkbox v-else-if="type === 'checkbox'" class="flex1" :multiple="item.multiple" <el-checkbox v-else-if="type === 'checkbox'" 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()" @change="onItemCheckboxChange"> :disabled="getDisabled()" :placeholder="getPlaceholder()" @change="onItemCheckboxChange">
{{ item.checkboxLabel }}
</el-checkbox> </el-checkbox>
<el-radio-group v-else-if="type === 'radio'" v-model="inputValue" <el-radio-group v-else-if="type === 'radio'" v-model="inputValue"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" :disabled="getDisabled()" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" :disabled="getDisabled()"
@ -34,16 +35,15 @@
</el-radio-group> </el-radio-group>
<div v-else-if="type === 'checkboxList'" class="flex1 checkbox-list-container" <div v-else-if="type === 'checkboxList'" class="flex1 checkbox-list-container"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')"> :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')">
<el-checkbox-group v-model="inputValue" @change="onInputChange">
<el-checkbox-group v-model="checkboxListValue.checkboxValues" @change="onCheckboxListChange">
<div v-for="option in item.options" :key="option.value" class="checkbox-item"> <div v-for="option in item.options" :key="option.value" class="checkbox-item">
<el-checkbox :label="option.value" :disabled="getDisabled()"> <el-checkbox :label="option.value" :disabled="getDisabled()">
{{ option.label }} {{ option.label }}
</el-checkbox> </el-checkbox>
<div v-if="option.otherCode && inputValue.includes(option.value)">
<el-input v-model="otherValues[option.otherCode]"
:placeholder="option.otherPlaceholder || '请输入'"
:class="{ 'error-border': isOtherInputError(option.otherCode) }" @blur="onBlur"
@input="onOtherInputChange(option.otherCode, $event)" />
<div v-if="isShowCheckboxListOther(option)">
<el-input v-model="checkboxListValue.otherValues[option.otherCode]"
:class="{ 'error-border': isOtherInputError(option.otherCode) }"
:placeholder="option.otherPlaceholder || '请输入'" @blur="onCheckboxListOtherBlur($event, option.otherCode)"/>
</div> </div>
</div> </div>
</el-checkbox-group> </el-checkbox-group>
@ -109,6 +109,22 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="type === 'fqyq'" :class="getFillTypeStyle()">
<el-radio-group v-model="fqyqValue.mainRadio" :disabled="getDisabled()" @input="onFqyqRadioChange($event,'mainRadio')">
<div class="item-center mb-10">
<el-radio label="是"></el-radio>
<div class="item-center" v-if="fqyqValue.mainRadio === '是'">
<el-input class="fqyq-input" maxlength="100" v-model="fqyqValue.inputValue" :disabled="getDisabled()" placeholder="请输入" @blur="onFqyqInputBlur" ></el-input>
<div class="fs-14 mr-10">是否在规定时间完成</div>
<el-radio-group v-model="fqyqValue.subRadio" :disabled="getDisabled()" @input="onFqyqRadioChange($event,'subRadio')">
<el-radio label="是"></el-radio>
<el-radio label="否"></el-radio>
</el-radio-group>
</div>
</div>
<el-radio label="否"></el-radio>
</el-radio-group>
</div>
</div> </div>
<div class="handle-row" v-if="isShowHandle()"> <div class="handle-row" v-if="isShowHandle()">
@ -181,6 +197,8 @@ import moment from "moment";
import { deepClone } from "@/utils/index"; import { deepClone } from "@/utils/index";
import { getuuid } from "@/utils/index.js"; import { getuuid } from "@/utils/index.js";
import { getToken } from "@/utils/auth" import { getToken } from "@/utils/auth"
import { isValueEmpty } from '@/utils/index.js';
export default { export default {
inject: ['templateData', 'templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"], inject: ['templateData', 'templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"],
components: { components: {
@ -240,24 +258,24 @@ export default {
let initialValue = this.value; let initialValue = this.value;
let initialOtherValues = {}, checkboxTagList = []; let initialOtherValues = {}, checkboxTagList = [];
// checkboxListvalue
if (this.type === 'checkboxList' && this.value && typeof this.value === 'object') {
initialValue = this.value.checkboxValues || [];
initialOtherValues = this.value.otherValues || {};
} else if (this.type === 'checkboxList' && !Array.isArray(this.value)) {
initialValue = [];
if(this.type === 'checkboxList' && !this.value) {
initialValue = {
checkboxValues: [],
otherValues: {}
};
} else if (this.type === 'checkboxTag' && Array.isArray(this.value)) { } else if (this.type === 'checkboxTag' && Array.isArray(this.value)) {
// checkboxTagvalue // checkboxTagvalue
checkboxTagList = this.value.map(tag => ({ checkboxTagList = this.value.map(tag => ({
checked: tag.checked, checked: tag.checked,
tagValue: tag.tagValue || '' tagValue: tag.tagValue || ''
})); }));
}
} else if (this.type === 'fqyq' && !this.value) {
initialValue = {mainRadio: '', subRadio: '',inputValue:""};
}
return { return {
inputValue: initialValue, inputValue: initialValue,
oldValue: initialValue, // oldValue: initialValue, //
otherValues: initialOtherValues, // checkboxListotherCode
oldOtherValues: { ...initialOtherValues }, // otherValues
showModal: false, // showModal: false, //
modificationRecords: [], // modificationRecords: [], //
modalTimer: null, // modalTimer: null, //
@ -269,6 +287,10 @@ export default {
checkboxValue: this.getChecked(),// checkboxValue: this.getChecked(),//
checkboxTagList: checkboxTagList, // checkboxTag checkboxTagList: checkboxTagList, // checkboxTag
oldCheckboxTagList: JSON.parse(JSON.stringify(checkboxTagList)), // checkboxTagList oldCheckboxTagList: JSON.parse(JSON.stringify(checkboxTagList)), // checkboxTagList
fqyqValue: initialValue, // fqyq
oldFqyqValue: {...initialValue}, // fqyq
checkboxListValue: initialValue, // checkboxList
oldCheckboxListValue: JSON.parse(JSON.stringify(initialValue)), // checkboxList
uuid: getuuid(), // EventBus uuid: getuuid(), // EventBus
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb', 'qxbd'], //// regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb', 'qxbd'], ////
selectRegentInfo: {},//// selectRegentInfo: {},////
@ -280,22 +302,32 @@ export default {
pendingUploadFile: null, // pendingUploadFile: null, //
pendingRemoveFile: null, // pendingRemoveFile: null, //
currentTagIndex:-1,//checkboxTag currentTagIndex:-1,//checkboxTag
currentHandleType:'',//
currentOtherCode:'',//otherCode
} }
}, },
watch: { watch: {
value(newVal) { value(newVal) {
console.log(newVal, "newVal")
if (this.type === 'checkboxList' && newVal && typeof newVal === 'object') { if (this.type === 'checkboxList' && newVal && typeof newVal === 'object') {
this.inputValue = newVal.checkboxValues || [];
this.otherValues = newVal.otherValues || {};
this.checkboxListValue = {
checkboxValues: newVal.checkboxValues || [],
otherValues: newVal.otherValues || {}
};
} else if (this.type === 'checkboxTag' && Array.isArray(newVal)) { } else if (this.type === 'checkboxTag' && Array.isArray(newVal)) {
// checkboxTagvalue // checkboxTagvalue
this.checkboxTagList = newVal.map(tag => ({ this.checkboxTagList = newVal.map(tag => ({
checked: tag.checked, checked: tag.checked,
tagValue: tag.tagValue || '' tagValue: tag.tagValue || ''
})); }));
} else {
this.inputValue = this.type === 'checkboxList' && !Array.isArray(newVal) ? [] : newVal;
} else if (this.type === 'fqyq' && newVal && typeof newVal === 'object') {
// fqyq
this.fqyqValue = {
mainRadio: newVal.mainRadio || '',
inputValue: newVal.inputValue || '',
subRadio: newVal.subRadio || ''
};
} else {
this.inputValue = newVal;
} }
} }
}, },
@ -331,7 +363,7 @@ export default {
}, },
methods: { methods: {
getFlexClass() { getFlexClass() {
const noFlexArr = ["radio", "checkboxTag"]
const noFlexArr = ["radio", "checkboxTag","fqyq"]
return noFlexArr.includes(this.type) ? '' : 'flex1' return noFlexArr.includes(this.type) ? '' : 'flex1'
}, },
getDecimalDigits() { getDecimalDigits() {
@ -650,13 +682,14 @@ export default {
}, },
getFillTypeStyle(type) { getFillTypeStyle(type) {
const { fillType } = this.item; const { fillType } = this.item;
const filterType = ["attachment","checkboxTag","fqyq"]
const typeObj = { const typeObj = {
actFill: "orange-border",// actFill: "orange-border",//
green: "green-border", green: "green-border",
preFill: "blue-border",// preFill: "blue-border",//
} }
// //
if (this.error && this.type !== "attachment" && this.type !== "checkboxTag") {
if (this.error && !filterType.includes(this.type)) {
return "error-border"; return "error-border";
} }
return typeObj[fillType] || "" return typeObj[fillType] || ""
@ -771,49 +804,17 @@ export default {
// //
onInputChange(val) { onInputChange(val) {
let value = val !== undefined ? val : this.inputValue; let value = val !== undefined ? val : this.inputValue;
// checkboxListcheckboxValuesotherValues
if (this.type === 'checkboxList') {
// checkbox
if (this.oldValue && Array.isArray(this.oldValue)) {
const uncheckedValues = this.oldValue.filter(oldVal => !this.inputValue.includes(oldVal));
// checkboxotherValues
if (uncheckedValues.length > 0) {
this.item.options.forEach(option => {
if (uncheckedValues.includes(option.value) && option.otherCode) {
this.$delete(this.otherValues, option.otherCode);
}
});
}
}
value = {
checkboxValues: this.inputValue,
otherValues: this.otherValues
};
if (val) {
this.onCommonHandleSaveRecord();
}
}
this.$emit('input', value); this.$emit('input', value);
this.$emit('change', value); this.$emit('change', value);
// //
const isEmpty = this.isValueEmpty(value);
const isEmpty = isValueEmpty(value);
if (this.error && !isEmpty) { if (this.error && !isEmpty) {
this.$emit('update:error', false); this.$emit('update:error', false);
} else if (!this.error && isEmpty) { } else if (!this.error && isEmpty) {
this.$emit('update:error', true); this.$emit('update:error', true);
} }
}, },
// checkboxListotherCode
onOtherInputChange(code, value) {
this.otherValues[code] = value;
this.onInputChange();
},
// checkboxTagcheckbox // checkboxTagcheckbox
onCheckboxTagChange(tagIndex, e) { onCheckboxTagChange(tagIndex, e) {
this.currentTagIndex = tagIndex; this.currentTagIndex = tagIndex;
@ -821,6 +822,20 @@ export default {
this.emitCheckboxTagValue(); this.emitCheckboxTagValue();
this.onCommonHandleSaveRecord(); this.onCommonHandleSaveRecord();
}, },
// checkboxList
isShowCheckboxListOther(option) {
const {checkboxValues } = this.checkboxListValue
if (!checkboxValues) {
return false;
}
return option.otherCode && checkboxValues.includes(option.value);
},
// checkboxListcheckbox
onCheckboxListChange(val) {
this.currentHandleType = 'checkboxListValue';
this.checkboxListValue.checkboxValues = val;
this.onCommonHandleSaveRecord();
},
// tag // tag
onTagBlur(tagIndex) { onTagBlur(tagIndex) {
@ -842,10 +857,32 @@ export default {
this.$emit('input', [...this.checkboxTagList]); this.$emit('input', [...this.checkboxTagList]);
this.$emit('change', [...this.checkboxTagList]); this.$emit('change', [...this.checkboxTagList]);
}, },
// fqyq radio
onFqyqRadioChange(val, radioType) {
this.fqyqValue[radioType] = val;
this.currentHandleType = radioType;
this.onCommonHandleSaveRecord();
},
// fqyq
onFqyqInputBlur(e) {
this.fqyqValue.inputValue = e.target.value;
this.currentHandleType = 'inputValue';
this.onCommonHandleSaveRecord(this.fqyqValue.inputValue);
},
// //
onBlur(e) { onBlur(e) {
this.onCommonHandleSaveRecord(e.target.value); this.onCommonHandleSaveRecord(e.target.value);
}, },
// checkboxList
onCheckboxListOtherBlur(e, otherCode) {
this.currentHandleType = "checkboxListOther";
this.currentOtherCode = otherCode;
this.checkboxListValue.otherValues[otherCode] = e.target.value;
this.onCommonHandleSaveRecord(e.target.value);
},
// question // question
onClickQuestion() { onClickQuestion() {
const { templateFillType } = this; const { templateFillType } = this;
@ -874,8 +911,27 @@ export default {
this.visible = true; this.visible = true;
} }
}, },
getCheckboxListInfo(){
const { otherValues,checkboxValues } = this.checkboxListValue;
const { otherValues: oldOtherValues,checkboxValues: oldCheckboxValues } = this.oldCheckboxListValue;
const o = {
"checkboxListValue":{oldValue:oldCheckboxValues,newValue:checkboxValues,des:""},
"checkboxListOther":{oldValue:oldOtherValues[this.currentOtherCode],newValue:otherValues[this.currentOtherCode],des:""},
}
return o[this.currentHandleType];
},
getFqyqInfo(){
const { mainRadio,inputValue,subRadio } = this.fqyqValue;
const { mainRadio: oldMainRadio,inputValue: oldInputValue,subRadio: oldSubRadio } = this.oldFqyqValue;
const o ={
"mainRadio":{oldValue:oldMainRadio,newValue:mainRadio,des:""},
"inputValue":{oldValue:oldInputValue,newValue:inputValue,des:""},
"subRadio":{oldValue:oldSubRadio,newValue:subRadio,des:"是否在规定时间完成:"}
}
return o[this.currentHandleType];
},
async onCommonHandleSaveRecord(val) { async onCommonHandleSaveRecord(val) {
const isEmpty = this.isValueEmpty(this.inputValue);
const isEmpty = isValueEmpty(this.inputValue);
if (this.error && !isEmpty) { if (this.error && !isEmpty) {
this.$emit('update:error', false); this.$emit('update:error', false);
} else if (!this.error && isEmpty) { } else if (!this.error && isEmpty) {
@ -920,21 +976,27 @@ export default {
// //
let isSame = true, isOldValueEmpty = true; let isSame = true, isOldValueEmpty = true;
const { currentHandleType } = this;
// checkboxListotherValues // checkboxListotherValues
if (this.type === 'checkboxList' && this.otherValues) {
isSame = this.isEqual(this.oldOtherValues, this.otherValues);
isOldValueEmpty = this.isValueEmpty(this.oldOtherValues);
if (this.type === 'checkboxList') {
const current = this.getCheckboxListInfo();
isSame = this.isEqual(current.oldValue,current.newValue);
isOldValueEmpty = isValueEmpty(current.oldValue);
} else if (this.type === "checkboxTag") { } else if (this.type === "checkboxTag") {
// checkboxTagtagIndex // checkboxTagtagIndex
const currentTag = this.checkboxTagList[this.currentTagIndex]; const currentTag = this.checkboxTagList[this.currentTagIndex];
const oldTag = this.oldCheckboxTagList[this.currentTagIndex] || {}; const oldTag = this.oldCheckboxTagList[this.currentTagIndex] || {};
isSame = this.isEqual(oldTag.checked, currentTag.checked); isSame = this.isEqual(oldTag.checked, currentTag.checked);
isOldValueEmpty = this.isValueEmpty(oldTag.checked);
}else{
isOldValueEmpty = isValueEmpty(oldTag.checked);
} else if (this.type === "fqyq") {
const current = this.getFqyqInfo();
isSame = this.isEqual(current.oldValue,current.newValue);
isOldValueEmpty = isValueEmpty(current.oldValue);
} else {
isSame = this.isEqual(this.oldValue, this.inputValue) isSame = this.isEqual(this.oldValue, this.inputValue)
isOldValueEmpty = this.isValueEmpty(this.oldValue);
isOldValueEmpty = isValueEmpty(this.oldValue);
} }
console.log(isSame,isOldValueEmpty,this.fqyqValue,this.oldFqyqValue,"isSame")
if (isSame) { if (isSame) {
return; return;
} }
@ -952,8 +1014,8 @@ export default {
let oldValue = this.oldValue; let oldValue = this.oldValue;
if (this.type === 'checkboxList') { if (this.type === 'checkboxList') {
oldValue = { oldValue = {
checkboxValues: oldValue.checkboxValues || oldValue,
otherValues: this.oldOtherValues
checkboxValues: this.oldCheckboxListValue.checkboxValues,
otherValues: this.oldCheckboxListValue.otherValues
}; };
} else if (this.type === "checkboxTag") { } else if (this.type === "checkboxTag") {
// checkboxTag退tagIndex // checkboxTag退tagIndex
@ -966,6 +1028,10 @@ export default {
this.checkboxTagList = JSON.parse(JSON.stringify(this.oldCheckboxTagList)); this.checkboxTagList = JSON.parse(JSON.stringify(this.oldCheckboxTagList));
oldValue = [...this.checkboxTagList]; oldValue = [...this.checkboxTagList];
} }
} else if (this.type === "fqyq") {
// 退
this.fqyqValue = JSON.parse(JSON.stringify(this.oldFqyqValue));
oldValue = { ...this.fqyqValue };
} }
this.inputValue = this.oldValue; this.inputValue = this.oldValue;
this.$emit('input', oldValue); // v-model this.$emit('input', oldValue); // v-model
@ -993,8 +1059,17 @@ export default {
const currentTag = this.checkboxTagList[this.currentTagIndex] || {}; const currentTag = this.checkboxTagList[this.currentTagIndex] || {};
recordOldVlaue = `${oldTag.tagValue || ''}:${oldTag.checked ? '勾选' : '未勾选'}`; recordOldVlaue = `${oldTag.tagValue || ''}:${oldTag.checked ? '勾选' : '未勾选'}`;
recordValue = `${currentTag.tagValue || ''}:${currentTag.checked ? '勾选' : '未勾选'}`; recordValue = `${currentTag.tagValue || ''}:${currentTag.checked ? '勾选' : '未勾选'}`;
isModify = oldTag.checked !== undefined
isModify = oldTag.checked !== undefined;
} else if (this.type === "fqyq") {
const current = this.getFqyqInfo();
recordOldVlaue = `${current.des+current.oldValue}`;
recordValue = `${current.des+current.newValue}`;
isModify = !!this.oldFqyqValue.mainRadio
}else if(this.type === "checkboxList"){
const current = this.getCheckboxListInfo();
recordOldVlaue = `${current.oldValue || ''}`;
recordValue = `${current.newValue || ''}`;
isModify = !!current.oldValue;
} }
const record = { const record = {
...baseInfo, ...baseInfo,
@ -1015,8 +1090,7 @@ export default {
// oldValueoldOtherValues // oldValueoldOtherValues
if (this.type === 'checkboxList') { if (this.type === 'checkboxList') {
this.oldValue = [...this.inputValue];
this.oldOtherValues = { ...this.otherValues };
this.oldCheckboxListValue = JSON.parse(JSON.stringify(this.checkboxListValue));
} else if (this.type === "checkboxTag") { } else if (this.type === "checkboxTag") {
// checkboxTagtagIndex // checkboxTagtagIndex
if (this.currentTagIndex >= 0 && this.currentTagIndex < this.checkboxTagList.length) { if (this.currentTagIndex >= 0 && this.currentTagIndex < this.checkboxTagList.length) {
@ -1025,15 +1099,20 @@ export default {
// tagIndex // tagIndex
this.oldCheckboxTagList = JSON.parse(JSON.stringify(this.checkboxTagList)); this.oldCheckboxTagList = JSON.parse(JSON.stringify(this.checkboxTagList));
} }
} else if (this.type === "fqyq") {
//
this.oldFqyqValue = JSON.parse(JSON.stringify(this.fqyqValue));
} }
let value = this.inputValue; let value = this.inputValue;
if (this.type === 'checkboxList') { if (this.type === 'checkboxList') {
value = { value = {
checkboxValues: this.inputValue,
otherValues: this.otherValues
checkboxValues: this.checkboxListValue.checkboxValues,
otherValues: this.checkboxListValue.otherValues
}; };
} else if (this.type === "checkboxTag") { } else if (this.type === "checkboxTag") {
value = [...this.checkboxTagList]; value = [...this.checkboxTagList];
} else if (this.type === "fqyq") {
value = { ...this.fqyqValue };
} }
if (this.type === "button") { if (this.type === "button") {
this.$emit('clickButton', this.item, this.inputValue, data); this.$emit('clickButton', this.item, this.inputValue, data);
@ -1107,6 +1186,9 @@ export default {
if (Array.isArray(value) && value.length === 0) { if (Array.isArray(value) && value.length === 0) {
return true; return true;
} }
if (Object.keys(value).length === 0) {
return true;
}
return false; return false;
}, },
// checkboxListotherCode // checkboxListotherCode
@ -1115,7 +1197,7 @@ export default {
return false; return false;
} }
// otherCode // otherCode
return this.isValueEmpty(this.otherValues[otherCode]);
return isValueEmpty(this.otherValues[otherCode]);
}, },
handleClickable(item, event) { handleClickable(item, event) {
if (this.templateFillType !== 'actFill') { if (this.templateFillType !== 'actFill') {
@ -1168,7 +1250,7 @@ export default {
if (this.getDisabled()) { if (this.getDisabled()) {
return "" return ""
} }
if (this.regentType.includes(type) || type === "clickable") {
if (this.regentType.includes(type) || type === "clickable" || type === "fqyq") {
return this.$t("template.common.pleaseSelect") return this.$t("template.common.pleaseSelect")
} }
let prex = "template.common.pleaseFillIn" let prex = "template.common.pleaseFillIn"
@ -1677,6 +1759,9 @@ export default {
border-color: #f9c588; border-color: #f9c588;
} }
} }
.el-radio__inner {
border-color: #f9c588;
}
} }
} }
@ -1731,4 +1816,17 @@ export default {
} }
} }
} }
.fqyq-input{
width: 500px;
margin-right:10px;
}
.mb-10{
margin-bottom: 10px;
}
.fs-14{
font-size: 14px;
}
.mr-10{
margin-right: 10px;
}
</style> </style>

+ 130
- 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,84 @@ 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 cl from './StepComponents/b/cl.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 +162,7 @@ export default {
data() { data() {
return { return {
stepSelectConfig: { stepSelectConfig: {
options: stepTypes,
options: [],
fillType: "preFill", fillType: "preFill",
placeholder: "请选择步骤类型" placeholder: "请选择步骤类型"
}, },
@ -164,6 +196,7 @@ export default {
Jrjb, Jrjb,
Cs, Cs,
Sy, Sy,
Zy,
Dc, Dc,
Jd, Jd,
Jz, Jz,
@ -180,6 +213,16 @@ export default {
Fs, Fs,
Fb, Fb,
Zlfz, Zlfz,
//
kbyq,
kbsjgsp,
kb,
jr,
//
//
jrry_b,
cl,
}, },
computed: { computed: {
stepComponentMap() { stepComponentMap() {
@ -207,6 +250,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 +268,36 @@ 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',
'cl': 'cl',
'lx_b': 'lx',
'cs_b': 'cs',
'hwhy_b': 'Hwhy',
'zyhy_b': 'Zyhy',
'wxhy_b': 'Wxhy',
'ddhy_b': 'Ddhy',
'jb_b': 'Jb',
'jrjb_b': 'Jrjb',
'sy_b': 'Sy',
'zy_b': 'Zy',
'dc_b': 'Dc',
'glzd_b': 'Glzd',
'glsd_b': 'Glsd',
'jz_b': 'Jz',
'jd_b': 'Jd',
'fy_b': 'Fy',
'fr_b': 'Fr',
} }
} }
return this.componentMap return this.componentMap
@ -242,6 +316,7 @@ export default {
// // // //
// this.addStep() // this.addStep()
// } // }
this.getStepList()
}, },
watch: { watch: {
// steps: { // steps: {
@ -263,6 +338,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';
}, },

+ 43
- 0
src/components/Template/StepComponents/b/cl.vue View File

@ -0,0 +1,43 @@
<!-- 称量 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_cl" @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",
},
yq: {
type: "yq",
fillType: "actFill",
},
text2: {
label: "仪器,按上表进行称量。",
type: "text",
},
remark: {
type: "input",
fillType: "actFill",
},
}
}]
}
},
}
</script>
<style lang="scss" scoped></style>

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

+ 14
- 1
src/components/Template/StepComponents/ry/cs.vue View File

@ -10,12 +10,18 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default { export default {
mixins: [stepMixins], mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'cs',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config: { config: {
text1: { text1: {
label: "使用超声波清洗机", label: "使用超声波清洗机",
@ -100,6 +106,13 @@ export default {
} }
}] }]
if(this.sn==='cs_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/dc.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: 'dc',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用氮吹仪", label:"使用氮吹仪",
@ -48,6 +54,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
} }
} }
}] }]
if(this.sn==='dc_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/ddhy.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: 'ddhy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"将溶液进行上下颠倒,预计颠倒", label:"将溶液进行上下颠倒,预计颠倒",
@ -40,6 +46,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
} }
} }
}] }]
if(this.sn==='ddhy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/fr.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: 'fr',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用", label:"使用",
@ -77,6 +83,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
} }
} }
}] }]
if(this.sn==='fr_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/fy.vue View File

@ -10,12 +10,18 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default { export default {
mixins: [stepMixins], mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'fy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config: { config: {
text1: { text1: {
label: "使用", label: "使用",
@ -84,6 +90,13 @@ export default {
} }
}] }]
if(this.sn==='fy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/glsd.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: 'glsd',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text2:{ text2:{
label:"选择", label:"选择",
@ -34,6 +40,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
}, },
} }
}] }]
if(this.sn==='glsd_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/glzd.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: 'glzd',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用隔膜真空泵", label:"使用隔膜真空泵",
@ -42,6 +48,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
}, },
} }
}] }]
if(this.sn==='glzd_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/hwhy.vue View File

@ -10,12 +10,18 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default { export default {
mixins: [stepMixins], mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'hwhy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config: { config: {
text1: { text1: {
label: "使用恒温混匀仪", label: "使用恒温混匀仪",
@ -125,6 +131,13 @@ export default {
}, },
} }
}] }]
if(this.sn==='hwhy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/jb.vue View File

@ -10,12 +10,18 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default { export default {
mixins: [stepMixins], mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'jb',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config: { config: {
text1: { text1: {
label: "使用搅拌仪", label: "使用搅拌仪",
@ -87,6 +93,13 @@ export default {
} }
}] }]
if(this.sn==='jb_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/jd.vue View File

@ -10,12 +10,18 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default { export default {
mixins: [stepMixins], mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'jd',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config: { config: {
text1: { text1: {
label: "将", label: "将",
@ -126,6 +132,13 @@ export default {
} }
}] }]
if(this.sn==='jd_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

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

+ 14
- 1
src/components/Template/StepComponents/ry/jrjb.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: 'jrjb',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用搅拌仪", label:"使用搅拌仪",
@ -104,6 +110,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
} }
}] }]
if(this.sn==='jrjb_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/jz.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: 'jz',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"将", label:"将",
@ -78,6 +84,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
}, },
} }
}] }]
if(this.sn==='jz_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

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

+ 14
- 1
src/components/Template/StepComponents/ry/sy.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: 'sy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用水浴锅", label:"使用水浴锅",
@ -74,6 +80,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
}, },
} }
}] }]
if(this.sn==='sy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/wxhy.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: 'wxhy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用涡旋混匀仪", label:"使用涡旋混匀仪",
@ -30,6 +36,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
}, },
} }
}] }]
if(this.sn==='wxhy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/zy.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: 'zy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用正压萃取仪", label:"使用正压萃取仪",
@ -30,6 +36,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
} }
} }
}] }]
if(this.sn==='zy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 14
- 1
src/components/Template/StepComponents/ry/zyhy.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: 'zyhy',
},
},
components: { components: {
StepFormPackage StepFormPackage
}, },
computed: { computed: {
formConfig() { formConfig() {
return [{
let config = [{
config:{ config:{
text1:{ text1:{
label:"使用", label:"使用",
@ -105,6 +111,13 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
} }
} }
}] }]
if(this.sn==='zyhy_b'){
config[0].config.remark = {
type: "input",
fillType: "actFill",
}
}
return config
} }
}, },
} }

+ 59
- 28
src/components/Template/mixins/formPackageMixins.js View File

@ -54,7 +54,7 @@ export default {
} }
this.onValueChangeCompareTo(key, val); this.onValueChangeCompareTo(key, val);
this.formFields[key] = val; this.formFields[key] = val;
this.$emit("select", { key, value: val, type,...this.formFields });
this.$emit("select", { key, value: val, type, ...this.formFields });
// 清除该表单项的错误状态 // 清除该表单项的错误状态
if (this.errors[key]) { if (this.errors[key]) {
this.$set(this.errors, key, false); this.$set(this.errors, key, false);
@ -62,22 +62,22 @@ export default {
}, },
//试剂/仪器等弹窗提交 //试剂/仪器等弹窗提交
onRegentSubmit(data,inputValue,key,item){
this.updateFormData(key,inputValue);
this.$emit("onRegentSubmit", {selectInfo:data,inputValue,key,config:item});
onRegentSubmit(data, inputValue, key, item) {
this.updateFormData(key, inputValue);
this.$emit("onRegentSubmit", { selectInfo: data, inputValue, key, config: item });
}, },
getRegentItem(item,fieldCode="type"){
const type = item[fieldCode] ;
console.log(item,"type")
getRegentItem(item, fieldCode = "type") {
const type = item[fieldCode];
console.log(item, "type")
return { return {
label: "", label: "",
type, type,
fillType: item.subFillType || item.fillType, fillType: item.subFillType || item.fillType,
parentLabel: item.label, parentLabel: item.label,
filledCodes:item.filledCodes,
filledCodes: item.filledCodes,
} }
}, },
handleClickButton(key) { handleClickButton(key) {
this.$emit("clickButton", key) this.$emit("clickButton", key)
}, },
@ -96,7 +96,7 @@ export default {
this.$set(this.errors, key, false); this.$set(this.errors, key, false);
} }
}, },
//批量更新表单数据
//批量更新表单数据
batchUpdateFormData(data) { batchUpdateFormData(data) {
const cloneFormFields = JSON.parse(JSON.stringify(this.formFields)); const cloneFormFields = JSON.parse(JSON.stringify(this.formFields));
Object.keys(data).forEach(key => { Object.keys(data).forEach(key => {
@ -107,29 +107,29 @@ export default {
this.$set(this.errors, key, false); this.$set(this.errors, key, false);
} }
}) })
}, },
//更新表单数据 //更新表单数据
updateFormData(key, value,data) {
const {isUpdateRecord,signData} = data || {};
updateFormData(key, value, data) {
const { isUpdateRecord, signData } = data || {};
// 深拷贝当前表单数据,避免直接修改原数据 // 深拷贝当前表单数据,避免直接修改原数据
const cloneFormFields = JSON.parse(JSON.stringify(this.formFields)); const cloneFormFields = JSON.parse(JSON.stringify(this.formFields));
this.oldFormFields[key] = cloneFormFields[key]; this.oldFormFields[key] = cloneFormFields[key];
this.formFields[key] = value; this.formFields[key] = value;
// 清除该表单项的错误状态 // 清除该表单项的错误状态
if (this.errors[key]) { if (this.errors[key]) {
this.$set(this.errors, key, false); this.$set(this.errors, key, false);
} }
if(isUpdateRecord){
if (isUpdateRecord) {
setTimeout(() => { setTimeout(() => {
this.$refs[key][0].handleUpdateRecord(signData,{oldValue:this.oldFormFields[key],inputValue:value});
this.$refs[key][0].handleUpdateRecord(signData, { oldValue: this.oldFormFields[key], inputValue: value });
}, 10); }, 10);
} }
}, },
handleClickable(sItem, key) { handleClickable(sItem, key) {
if (this.templateFillType !== 'actFill') { if (this.templateFillType !== 'actFill') {
return return
@ -177,7 +177,7 @@ export default {
fillType: sItem.subFillType || sItem.fillType, fillType: sItem.subFillType || sItem.fillType,
parentLabel: sItem.label, parentLabel: sItem.label,
} }
if(sItem.subDisabled){
if (sItem.subDisabled) {
config.disabled = sItem.subDisabled; config.disabled = sItem.subDisabled;
} }
return config; return config;
@ -215,14 +215,14 @@ export default {
// 处理特殊字段 - "其他"字段 // 处理特殊字段 - "其他"字段
if (currentConfig.otherCode) { if (currentConfig.otherCode) {
const { otherCode,type } = currentConfig;
const { otherCode, type } = currentConfig;
//如果是更新的话,优先使用formFields中的值 //如果是更新的话,优先使用formFields中的值
if (update) { if (update) {
result[otherCode] = formFields[otherCode] || formData[otherCode] || ''; result[otherCode] = formFields[otherCode] || formData[otherCode] || '';
} else { } else {
result[otherCode] = formData[otherCode] || formFields[otherCode] || ''; result[otherCode] = formData[otherCode] || formFields[otherCode] || '';
} }
config[otherCode] = { label: "template.common.other",parentType:type, parentKey: key, type: "input", fillType: currentConfig.fillType }
config[otherCode] = { label: "template.common.other", parentType: type, parentKey: key, type: "input", fillType: currentConfig.fillType }
} }
if (currentConfig.subKey) { if (currentConfig.subKey) {
const { subKey } = currentConfig; const { subKey } = currentConfig;
@ -311,17 +311,17 @@ export default {
if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段 if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
formFields[o.otherCode] = ""; formFields[o.otherCode] = "";
} }
}else if(o.type === "radioAndOther"){
const isSelectedOther = this.isShowOtherByRadioAndOther(formFields[key]);
} else if (o.type === "radioAndOther") {
const isSelectedOther = this.isShowOtherByRadioAndOther(formFields[key]);
if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段 if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
formFields[o.otherCode] = ""; formFields[o.otherCode] = "";
} }
} }
} }
if(o.type === "attachment"){
if (o.type === "attachment") {
const attValue = formFields[key]; const attValue = formFields[key];
if(!attValue || attValue == "[]"){
if (!attValue || attValue == "[]") {
errors.push({ errors.push({
field: key, field: key,
label: o.label, label: o.label,
@ -329,13 +329,44 @@ export default {
}); });
this.$set(this.errors, key, true); this.$set(this.errors, key, true);
} }
} else if (o.type === "fqyq") {
const fqyqValue = formFields[key];
const {mainRadio, subRadio,inputValue} = fqyqValue;
if (!mainRadio) {
errors.push({
field: key,
label: o.label,
error: "请选择是否在规定时间完成"
});
this.$set(this.errors, key, true);
} else {
if (mainRadio==="是") {
if (!subRadio) {
errors.push({
field: key,
label: o.label,
error: "请选择是否在规定时间完成"
});
this.$set(this.errors, key, true);
}else if(!inputValue){
errors.push({
field: key,
label: o.label,
error: "请输入信息"
});
this.$set(this.errors, key, true);
}
}
}
continue
} }
if (this.isValueEmpty(formFields[key])) { if (this.isValueEmpty(formFields[key])) {
// 其他字段需要判断是否显示再校验 // 其他字段需要判断是否显示再校验
if (o.label === "template.common.other" && !this.isShowOther(formFields[o.parentKey]) && o.parentType !== "radioAndOther") { if (o.label === "template.common.other" && !this.isShowOther(formFields[o.parentKey]) && o.parentType !== "radioAndOther") {
continue continue
} }
if (o.type === "radioAndOther" &&o.label === "template.common.other" && !this.isShowOtherByRadioAndOther(formFields[o.parentKey])) {
if (o.type === "radioAndOther" && o.label === "template.common.other" && !this.isShowOtherByRadioAndOther(formFields[o.parentKey])) {
continue continue
} }
//span的字段不校验 //span的字段不校验
@ -432,7 +463,7 @@ export default {
if (this.errors[key]) { if (this.errors[key]) {
this.$set(this.errors, key, false); this.$set(this.errors, key, false);
} }
// 如果是checkboxList类型,需要处理otherValues // 如果是checkboxList类型,需要处理otherValues
if (val && typeof val === 'object' && val.otherValues) { if (val && typeof val === 'object' && val.otherValues) {
// 将otherValues中的每个值也保存到formFields中 // 将otherValues中的每个值也保存到formFields中

+ 7
- 2
src/lang/en.js View File

@ -29,6 +29,8 @@ import yp from './en/template/yp'
import ada from './en/template/ada' import ada from './en/template/ada'
//毒理模板 //毒理模板
import dl from './en/template/dl' import dl from './en/template/dl'
//细胞模板
import xb from './zh/template/xb'
// 试验管理 // 试验管理
import study from './en/business/study/study' import study from './en/business/study/study'
@ -73,7 +75,8 @@ import gsp from './en/business/resource/gsp'
import archive from './en/business/archive/archive' import archive from './en/business/archive/archive'
//日志管理 //日志管理
import systemLog from './en/system/systemLog' import systemLog from './en/system/systemLog'
// 存储位置
import storageLocation from './en/system/storageLocation'
export default { export default {
system: { system: {
name: 'WestChina-Frontier PharmaTech ELN', name: 'WestChina-Frontier PharmaTech ELN',
@ -164,6 +167,7 @@ export default {
user, user,
template, template,
systemLog, systemLog,
storageLocation,
dict dict
}, },
business: { business: {
@ -202,6 +206,7 @@ export default {
lba: lba, lba: lba,
yp: yp, yp: yp,
ada: ada, ada: ada,
dl: dl
dl: dl,
xb: xb,
} }
} }

+ 13
- 0
src/lang/en/system/storageLocation.js View File

@ -0,0 +1,13 @@
export default {
fzdd: 'Location',
sbmc: 'Name or Id',
fzhj: 'Shelf placement',
wc: 'Compartment',
zt: 'Status',
ssbm: 'Department',
add: 'Add',
addStroageLocation: 'Add Storage Location',
editStroageLocation: 'Edit Storage Location',
no: 'disable',
yes: 'normal'
}

+ 14
- 0
src/lang/en/template/xb.js View File

@ -0,0 +1,14 @@
//细胞
export default {
xb001: {
jcsj: '检测时间',
czbz: 'Operation Workflow',
qtbz: '其他步骤',
fj: 'Attachment',
fpc: '分批次',
zb: '组别',
lx: '类型',
fysc: '孵育时长(hr: min)'
},
}

+ 7
- 1
src/lang/zh.js View File

@ -29,6 +29,8 @@ import yp from './zh/template/yp'
import ada from './zh/template/ada' import ada from './zh/template/ada'
//毒理模板 //毒理模板
import dl from './zh/template/dl' import dl from './zh/template/dl'
//细胞模板
import xb from './zh/template/xb'
// 试验管理 // 试验管理
import study from './zh/business/study/study' import study from './zh/business/study/study'
@ -72,6 +74,8 @@ import gsp from './zh/business/resource/gsp'
import archive from './zh/business/archive/archive' import archive from './zh/business/archive/archive'
//日志管理 //日志管理
import systemLog from './zh/system/systemLog' import systemLog from './zh/system/systemLog'
//存储位置
import storageLocation from './zh/system/storageLocation'
export default { export default {
system: { system: {
@ -159,6 +163,7 @@ export default {
user, user,
template, template,
systemLog, systemLog,
storageLocation,
dict dict
}, },
business: { business: {
@ -197,6 +202,7 @@ export default {
lba: lba, lba: lba,
yp: yp, yp: yp,
ada: ada, ada: ada,
dl: dl
dl: dl,
xb: xb,
} }
} }

+ 13
- 0
src/lang/zh/system/storageLocation.js View File

@ -0,0 +1,13 @@
export default {
fzdd: '放置地点',
sbmc: '设备名称或编号',
fzhj: '放置货架',
wc: '温层',
zt: '状态',
ssbm: '所属部门',
add: '新增',
addStroageLocation: '新增存储位置',
editStroageLocation: '编辑存储位置',
no: '禁用',
yes: '正常'
}

+ 14
- 0
src/lang/zh/template/xb.js View File

@ -0,0 +1,14 @@
//细胞
export default {
xb001: {
jcsj: '检测时间',
czbz: '操作步骤',
qtbz: '其他步骤',
fj: '附件',
fpc: '分批次',
zb: '组别',
lx: '类型',
fysc: '孵育时长(hr: min)'
},
}

+ 3
- 0
src/utils/index.js View File

@ -441,6 +441,9 @@ export function isValueEmpty(value) {
if (Array.isArray(value) && value.length === 0) { if (Array.isArray(value) && value.length === 0) {
return true return true
} }
if (Object.keys(value).length === 0) {
return true;
}
return false return false
} }

+ 1
- 1
src/utils/menu.js View File

@ -35,7 +35,7 @@ let menuObj = {
模板管理: 'Function', 模板管理: 'Function',
字典管理: 'Term Book', 字典管理: 'Term Book',
日志管理: 'Log', 日志管理: 'Log',
存储位置: 'Storage Location',
字典数据: 'Term Book Data' 字典数据: 'Term Book Data'
} }
export function getMenuName(menuName) { export function getMenuName(menuName) {

+ 1
- 1
src/views/business/comps/select/BusinessSelect.vue View File

@ -94,7 +94,7 @@ export default {
listData(this.queryParams).then(response => { listData(this.queryParams).then(response => {
this.list = response.rows this.list = response.rows
this.list.forEach(item => { this.list.forEach(item => {
item.dictLabel = item.bh
item.dictLabel = item.location + '/' + item.name + '/' + item.shelfPlacement
item.dictCode = item.id item.dictCode = item.id
}) })
}) })

+ 8
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -75,6 +75,9 @@ import YP003 from "./comps/yp/YP003.vue";
import YP004 from "./comps/yp/YP004.vue"; import YP004 from "./comps/yp/YP004.vue";
import YP005 from "./comps/yp/YP005.vue"; import YP005 from "./comps/yp/YP005.vue";
//
import XB001 from "./comps/xb/XB001.vue";
// //
// DL001-SYWZPZJHB // DL001-SYWZPZJHB
// DL002-使SP001 // DL002-使SP001
@ -141,7 +144,8 @@ export default {
DL021, DL021,
DL022, DL022,
DL023, DL023,
DL024
DL024,
XB001,//
}, },
data() { data() {
return { return {
@ -157,6 +161,7 @@ export default {
handleEditSignCancel(e) { handleEditSignCancel(e) {
EventBus.$emit('edit-sign-cancel', e); EventBus.$emit('edit-sign-cancel', e);
}, },
}, },
props: { props: {
sn: { sn: {
@ -245,6 +250,8 @@ export default {
'YP003': 'YP003', 'YP003': 'YP003',
'YP004': 'YP004', 'YP004': 'YP004',
'YP005': 'YP005', 'YP005': 'YP005',
//
'XB001': 'XB001',
// //
//DL001-SYWZPZJHB //DL001-SYWZPZJHB
'DL002': 'SP001', 'DL002': 'SP001',

+ 336
- 0
src/views/business/comps/template/comps/xb/XB001.vue View File

@ -0,0 +1,336 @@
<!-- 细胞CIC配制记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 操作步骤 -->
<LineLabel label="template.xb.xb001.czbz" />
<div class="template-form-item">
<div>第1步准备分析批</div>
<CustomTable
:ref="`tableFirstRef`"
:columns="tableFirstColumns"
:formData="formData"
:prefixKey = "`tableFirst`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'firstTable')" ></TableOpertaionDelete>
</template>
</CustomTable>
<div class="mb10">
<div>第2步</div>
<StepFormPackage ref = "stepFormPackageSecondRef" prefixKey="xb_czdsb" :form-config="stepSecondConfig" :formData = "formData" />
</div>
<div class="mb10">
<div>第3步</div>
<StepFormPackage ref = "stepFormPackageThirdRef" prefixKey="xb_czdtb" :form-config="stepThirdConfig" :formData = "formData" />
</div>
<div class="mb10">
<div>第4步</div>
<StepFormPackage ref = "stepFormPackageFourthRef" prefixKey="xb_czdfb" :form-config="stepFourthConfig" :formData = "formData" />
</div>
<div>
<div>第5步</div>
<StepFormPackage ref = "stepFormPackageFivthRef" prefixKey="xb_czdwb" :form-config="stepFivthConfig" :formData = "formData" />
<CustomTable
:ref="`tableSecondRef`"
:columns="tableSecondColumns"
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}"
:prefixKey = "`tableSecond`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'secondTable')" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<div class="mb10">
<div>第6步</div>
<StepFormPackage ref = "stepFormPackageSixthRef" prefixKey="xb_czdlb" :form-config="stepSixthConfig" :formData = "formData" />
</div>
</div>
<LineLabel label="template.xb.xb001.qtbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.xb.xb001.fj" label="template.xb.xb001.fj"
ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import stepMixins from '@/components/Template/mixins/stepMixins.js';
import CustomTable from '@/components/Template/CustomTable.vue';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import StepFormPackage from "@/components/Template/StepFormPackage.vue"
import { getStepSecond, getStepThird, getStepFourth, getStepFivth, getStepSixth} from "../../formConfig/xb/xb001.js";
export default {
name: "XB001",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete, StepFormPackage },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
stepSecondConfig() {
return getStepSecond(this);
},
stepThirdConfig() {
return getStepThird(this);
},
stepFourthConfig() {
return getStepFourth(this);
},
stepFivthConfig() {
return getStepFivth(this);
},
stepSixthConfig() {
return getStepSixth(this);
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.sp.sp008.xzjz',
type: "input",
fillType: "preFill",
subType: "sj",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
labelWidth: 80,
},
}
}
]
},
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
}
},
{
type: "cellItem",
label: 'template.xb.xb001.jcsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
getFjFormConfig() {
return [
{
type: "attachment",
config: {
attTitle: {
label: 'template.xb.xb001.fj',
type: "attachment",
fillType: "actFill",
},
}
}
]
},
//
tableFirstColumns() {
return [{
label: 'template.xb.xb001.fpc',
prop: 'fpc',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},{
label: 'template.xb.xb001.zb',
prop: 'yjzbs',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_xbzb'),
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
otherCode: "preOther1",
},{
label: 'template.xb.xb001.lx',
prop: 'sjzbs',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_xblx'),
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
otherCode: "preOther2",
}]
},
//
tableSecondColumns() {
return [
{
label: 'template.xb.xb001.fpc',
prop: 'fpc',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},
{
label: 'template.common.startTime',
prop: 'startTime',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},
{
label: 'template.common.endTime',
prop: 'endTime',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},
{
label: 'template.xb.xb001.fysc',
prop: 'fysc',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
getFilledFormData() {
return this.getFilledFormDataByRefs(
[
"baseInfoRef", "stepRef", "remarkRef",
"fjRef", "tableFirstRef", "stepFormPackageSecondRef",
"stepFormPackageThirdRef", "stepFormPackageFourthRef",
"stepFormPackageFivthRef", "tableSecondRef", "stepFormPackageSixthRef"
]
)
},
//
async getFormData() {
let content = await this.validFormFields([
"baseInfoRef", "stepRef", "remarkRef",
"fjRef", "tableFirstRef", "stepFormPackageSecondRef",
"stepFormPackageThirdRef", "stepFormPackageFourthRef",
"stepFormPackageFivthRef", "tableSecondRef", "stepFormPackageSixthRef"
]);
return content;
},
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = await this.$refs.stepRef.getFormData();
console.log(content);
},
//
deleteRow(rowIndex,type) {
const tableRef1 = this.$refs['tableFirstRef'];
const tableRef2 = this.$refs['tableSecondRef'];
if (type == 'firstTable' && tableRef1) {
tableRef1.deleteRow(rowIndex);
}
if (type == 'secondTable' && tableRef2) {
tableRef2.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>

+ 20
- 2
src/views/business/comps/template/comps/yp/YP003.vue View File

@ -31,6 +31,8 @@
<LineLabel label="template.yp.yp003.fqxx" /> <LineLabel label="template.yp.yp003.fqxx" />
<Step ref="stepRef" :formData="formData.stepData"></Step> <Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.yp.yp003.fqyq" label="template.yp.yp003.fqyq"
ref="fqyqRef" :formConfig="fqyqConig" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
@ -65,6 +67,22 @@ export default {
}, },
}, },
computed: { computed: {
//
fqyqConig() {
return [
{
type: "cellItem",
config: {
fqyq: {
label: "template.yp.yp003.sfyfzyq",
type: "fqyq",
fillType: "actFill",
span: 1,
}
}
}
]
},
// //
remarkConig() { remarkConig() {
return [ return [
@ -202,11 +220,11 @@ export default {
}, },
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"])
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "fqyqRef","remarkRef"])
}, },
// //
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "fqyqRef","remarkRef"]);
return content; return content;
}, },
getResource() { getResource() {

+ 4
- 7
src/views/business/comps/template/formConfig/sp/SP0019.js View File

@ -93,18 +93,15 @@ export const getYqColumns = ($this) => {
} }
//溶液 //溶液
export const getRyColumns = () => {
export const getRyColumns = ($this) => {
return [ return [
{ {
label: '溶液类型', label: '溶液类型',
prop: "rylx", prop: "rylx",
bodyType: "select", bodyType: "select",
bodyOptions: [
{
label: '溶液',
value: '溶液'
},
],
otherCode:'rylxOther',
width:380,
bodyOptions: $this.getDictOptions('business_rylx'),
bodyFillType: 'preFill', bodyFillType: 'preFill',
}, },
{ {

+ 361
- 0
src/views/business/comps/template/formConfig/xb/xb001.js View File

@ -0,0 +1,361 @@
//操作第二步配置
export const getStepSecond = ($this) => {
return [{
config:{
text1:{
label:"待测样品于",
type:"text",
},
dcyb:{
type:"input",
fillType:"preFill",
},
text2:{
label:"解冻完成后,分别使用移液器",
type:"text",
},
yyqfirst:{
type:"yq",
fillType:"actFill",
},
text3:{
label:"取待测血清预计",
type:"text",
},
dcxqyj:{
type:"inputNumber",
fillType:"preFill",
},
dcxqyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text4:{
label:"实际",
type:"text",
},
dcxqsj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"dcxqyj",
copyFrom:"dcxqyj"
},
dcxqsjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"dcxqyjdw",
copyFrom:"dcxqyjdw"
},
text5:{
label:"加入稀释深孔板,再分别使用移液器",
type:"text",
},
yyqsecond:{
type:"yq",
fillType:"actFill",
},
text6:{
label:"取BBS",
type:"text",
},
bbs:{
type:"sj",
fillType:"actFill",
},
text7:{
label:"预计",
type:"text",
},
bbsyj:{
type:"inputNumber",
fillType:"preFill",
},
bbsyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text8:{
label:"实际",
type:"text",
},
bbssj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"bbsyj",
copyFrom:"bbsyj"
},
bbssjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"bbsyjdw",
copyFrom:"bbsyjdw"
},
text9:{
label:"加入稀释深孔板,放在摇床上",
type:"text",
},
yc:{
type:"yq",
fillType:"actFill",
},
text10:{
label:"充分摇匀。",
type:"text",
},
}
}]
}
//操作第三步配置
export const getStepThird = ($this) => {
return [{
config:{
text1:{
label:"分别使用移液器",
type:"text",
},
yyqfirst:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"取BBS",
type:"text",
},
bbs:{
type:"sj",
fillType:"actFill",
},
text3:{
label:"预计",
type:"text",
},
bbsyj:{
type:"inputNumber",
fillType:"preFill",
},
bbsyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text4:{
label:"实际",
type:"text",
},
bbssj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"bbsyj",
copyFrom:"bbsyj"
},
bbssjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"bbsyjdw",
copyFrom:"bbsyjdw"
},
text5:{
label:"加入对照管中,再分别使用移液器",
type:"text",
},
yyqsecond:{
type:"yq",
fillType:"actFill",
},
text6:{
label:"取PEG-NaF",
type:"text",
},
pegnaf:{
type:"sj",
fillType:"actFill",
},
text7:{
label:"预计",
type:"text",
},
pegnafyj:{
type:"inputNumber",
fillType:"preFill",
},
pegnafyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text8:{
label:"实际",
type:"text",
},
pegnafsj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"pegnafyj",
copyFrom:"pegnafyj"
},
pegnafsjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"pegnafyjdw",
copyFrom:"pegnafyjdw"
},
text9:{
label:"加入测试管中。",
type:"text",
},
}
}]
}
//操作第四步配置
export const getStepFourth = ($this) => {
return [{
config:{
text1:{
label:"使用移液器",
type:"text",
},
yyq:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"分别往对照管和测试管中各加入已稀释的待测血清预计",
type:"text",
},
dcxqyj:{
type:"inputNumber",
fillType:"preFill",
},
dcxqyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text3:{
label:"实际",
type:"text",
},
dcxqsj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"dcxqyj",
copyFrom:"dcxqyj"
},
dcxqsjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"dcxqyjdw",
copyFrom:"dcxqyjdw"
}
}
}]
}
//操作第五步配置
export const getStepFivth = ($this) => {
return [{
config:{
text1:{
label:"将以上缓冲液与血清放在摇床",
type:"text",
},
yc:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"上充分混匀,置于孵育箱",
type:"text",
},
fyx:{
type:"yq",
fillType:"actFill",
},
text3:{
label:"中,设置预计温度",
type:"text",
},
yjwd:{
type:"inputNumber",
fillType:"preFill",
},
text4:{
label:"℃,实际温度",
type:"text",
},
sjwd:{
type:"inputNumber",
fillType:"actFill",
compareTo:"yjwd",
copyFrom:"yjwd"
},
text5:{
label:"℃,孵育",
type:"text",
},
fysj:{
type:"inputNumber",
fillType:"preFill",
},
text6:{
label:"小时。",
type:"text",
},
}
}]
}
//操作第六步配置
export const getStepSixth = ($this) => {
return [{
config:{
text1:{
label:"孵育完成后,使用移液器",
type:"text",
},
yyq:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"将对照管和测试管的溶液转移至对应的比色皿,用紫外分光光度计",
type:"text",
},
zwfggdj:{
type:"yq",
fillType:"actFill",
},
text3:{
label:",设置预计波长",
type:"text",
},
yjbc:{
type:"inputNumber",
fillType:"preFill",
},
text4:{
label:"nm,实际波长",
type:"text",
},
sjbc:{
type:"inputNumber",
fillType:"actFill",
compareTo:"yjbc",
copyFrom:"yjbc"
},
text5:{
label:"nm,测定其OD值。",
type:"text",
},
}
}]
}

+ 3
- 0
src/views/business/comps/template/mixins/templateMixin.js View File

@ -39,6 +39,9 @@ export default {
'business_sydd', // 毒理-Ames实验地点 'business_sydd', // 毒理-Ames实验地点
'business_dl_ameswrqk', // 毒理-Ames污染情况 'business_dl_ameswrqk', // 毒理-Ames污染情况
'business_dl_amescltj', // 毒理-Ames处理条件 'business_dl_amescltj', // 毒理-Ames处理条件
'business_rylx', // 溶液类型
'business_xbzb', // 细胞组别
'business_xblx', // 细胞类型
], ],
props: { props: {
templateData: { templateData: {

+ 7
- 7
src/views/business/resource/sj/comps/Bj.vue View File

@ -41,17 +41,17 @@
</template> </template>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<!-- 存储条件 -->
<el-form-item :label="$t('page.business.resource.sj.cctj')" prop="cctj">
<BusinessSelect dictType="business_cctj" v-model="form.cctj" />
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 存储位置 --> <!-- 存储位置 -->
<el-form-item :label="$t('page.business.resource.sj.ccwz')" prop="ccwz"> <el-form-item :label="$t('page.business.resource.sj.ccwz')" prop="ccwz">
<BusinessSelect dictType="business_ccwz" v-model="form.ccwz" @change="onChangeCcwz"/> <BusinessSelect dictType="business_ccwz" v-model="form.ccwz" @change="onChangeCcwz"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<!-- 存储条件 -->
<el-form-item :label="$t('page.business.resource.sj.cctj')" prop="cctj">
<BusinessSelect dictType="business_cctj" v-model="form.cctj" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -164,7 +164,7 @@ export default {
}) })
}, },
onChangeCcwz(val) { onChangeCcwz(val) {
console.log(val)
this.form.cctj = val.wc
} }
} }
} }

+ 2
- 2
src/views/business/resource/yq/comps/detail.vue View File

@ -42,7 +42,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<!-- <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.yq.sfccwz')" prop="ccwz" > <el-form-item :label="$t('page.business.resource.yq.sfccwz')" prop="ccwz" >
<el-select v-model="form.ccwz" :placeholder="$t('form.placeholderSelect')" disabled style="width: 100%;"> <el-select v-model="form.ccwz" :placeholder="$t('form.placeholderSelect')" disabled style="width: 100%;">
@ -63,7 +63,7 @@
<el-input v-model="form.fzdd" :placeholder="$t('form.placeholderInput')" maxlength="50" disabled/> <el-input v-model="form.fzdd" :placeholder="$t('form.placeholderInput')" maxlength="50" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
</el-row>-->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark"> <el-form-item :label="$t('form.remark')" prop="remark">

+ 7
- 7
src/views/business/resource/yq/list.vue View File

@ -17,12 +17,12 @@
<el-form-item :label="$t('page.business.resource.yq.ssbm') + ':'" prop="bmMc"> <el-form-item :label="$t('page.business.resource.yq.ssbm') + ':'" prop="bmMc">
<el-input v-model="queryParams.bmMc" placeholder="" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.bmMc" placeholder="" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('page.business.resource.yq.sfccwz') + ':'" prop="ccwz">
<!-- <el-form-item :label="$t('page.business.resource.yq.sfccwz') + ':'" prop="ccwz">
<el-select v-model="queryParams.ccwz" :placeholder="$t('form.placeholderSelect')" clearable @change="handleQuery"> <el-select v-model="queryParams.ccwz" :placeholder="$t('form.placeholderSelect')" clearable @change="handleQuery">
<el-option key="1" :label="$t('page.business.resource.yq.no')" value="1" /> <el-option key="1" :label="$t('page.business.resource.yq.no')" value="1" />
<el-option key="10" :label="$t('page.business.resource.yq.yes')" value="10" /> <el-option key="10" :label="$t('page.business.resource.yq.yes')" value="10" />
</el-select> </el-select>
</el-form-item>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search')
}}</el-button> }}</el-button>
@ -32,10 +32,10 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:gxsjk']">{{
<el-button type="primary" plain v-hasPermi="['business:resource:yq:gxyqk']">{{
$t('page.business.resource.yq.refresh') }}</el-button> $t('page.business.resource.yq.refresh') }}</el-button>
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:xz']">{{
$t('page.business.resource.yq.add') }}</el-button>
<!-- <el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:xz']">{{
$t('page.business.resource.yq.add') }}</el-button> -->
</el-col> </el-col>
</el-row> </el-row>
@ -54,8 +54,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.row)" v-hasPermi="['business:resource:yq:xq']">{{ <el-button type="text" @click="handleDetail(scope.row)" v-hasPermi="['business:resource:yq:xq']">{{
$t('form.detail') }}</el-button> $t('form.detail') }}</el-button>
<el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:resource:yq:bj']">{{
$t('form.edit') }}</el-button>
<!-- <el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:resource:yq:bj']">{{
$t('form.edit') }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

+ 296
- 0
src/views/business/storageLocation/list.vue View File

@ -0,0 +1,296 @@
<!-- 存储位置列表 -->
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item :label="$t('page.system.storageLocation.fzdd') + ':'" prop="location">
<el-input v-model="queryParams.location" placeholder="" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('page.system.storageLocation.sbmc') + ':'" prop="name">
<el-input v-model="queryParams.name" placeholder="" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('page.system.storageLocation.fzhj') + ':'" prop="shelfPlacement">
<el-input v-model="queryParams.shelfPlacement" placeholder="" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status" >
<el-select v-model="queryParams.status" :placeholder="$t('form.placeholderSelect')" clearable @change="handleQuery">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search')
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:storageLocation:add']">{{
$t('page.system.storageLocation.add') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.system.storageLocation.fzdd')" align="center" prop="location" />
<el-table-column :label="$t('page.system.storageLocation.sbmc')" align="center" prop="name" />
<el-table-column :label="$t('page.system.storageLocation.fzhj')" align="center" prop="shelfPlacement" />
<el-table-column :label="$t('page.system.storageLocation.wc')" align="center" prop="compartment" />
<el-table-column :label="$t('page.system.storageLocation.ssbm')" align="center" prop="deptName" />
<el-table-column :label="$t('page.system.storageLocation.zt')" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status == 1">{{ $t('page.system.storageLocation.no') }}</span>
<span v-if="scope.row.status == 10">{{ $t('page.system.storageLocation.yes') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.row)">{{
$t('form.detail') }}</el-button>
<el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:storageLocation:edit']">{{
$t('form.edit') }}</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改仪器管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzdd')" prop="location">
<el-input v-model="form.location" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.sbmc')" prop="name">
<el-input v-model="form.name" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzhj')" prop="shelfPlacement">
<el-input v-model="form.shelfPlacement" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.wc')" prop="compartment">
<BusinessSelect v-model="form.compartment" dictType="business_cctj"></BusinessSelect>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.ssbm')" prop="deptId">
<SelectDept v-model="form.deptId" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status">
<el-select v-model="form.status" :placeholder="$t('form.placeholderSelect')" style="width: 100%;">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input v-model="form.qmyy" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('form.signer')" prop="qmrmc">
<el-input v-model="nickName" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<el-input v-model="form.qmrmm" autocomplete="off" auto-complete="new-password" show-password
:placeholder="$t('form.placeholderInput')" type="password" maxlength="20" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('form.saveConfirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { storageLocation_list, storageLocation_add } from '@/api/business/storageLocation/storageLocation'
import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectDept from '@/views/business/comps/select/SelectDept';
import { mapGetters } from 'vuex'
import SelectStorageLocation from '@/views/business/comps/select/SelectStorageLocation'
export default {
name: 'StorageLocation',
components: { BusinessSelect, SelectDept, SelectStorageLocation },
data() {
return {
//
loading: true,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: '',
//
open: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
location: null,
name: null,
shelfPlacement: null,
},
//
form: {
'qmyy': this.$t('page.form.add')
},
//
rules: {
location: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
name: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
shelfPlacement: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
compartment: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "blur" }
],
deptId: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
status: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
qmrmm: [
{ required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 20, message: this.$t('form.signerPsw') + this.$t('form.lengthLimit') + '20', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'nickName', 'name'
]),
},
created() {
this.getList()
},
methods: {
/** 查询列表 */
getList() {
this.loading = true
storageLocation_list(this.queryParams).then((response) => {
this.list = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
mc: null,
bh: null,
xh: null,
ly: null,
jzrq: null,
bmId: null,
wc: null,
ccwz: null,
fzdd: null,
qmyy: this.$t('page.system.storageLocation.addStroageLocation'),
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.resetForm('queryForm')
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = this.$t('form.add')
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
this.form = row
this.form.qmyy = this.$t('page.system.storageLocation.editStroageLocation')
this.open = true
this.title = this.$t('form.edit')
},
handleDetail(row) {
this.$refs.YqDetail.show(row)
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.id) {
storageLocation_edit(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
} else {
storageLocation_add(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
}
}
})
},
}
}
</script>

+ 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