Browse Source

fix[表单模板]dl020解决冲突

ouqian
lslaiwy 1 month ago
parent
commit
544bbb4ced
50 changed files with 1786 additions and 425 deletions
  1. +9
    -0
      src/api/business/sj/sj.js
  2. +13
    -0
      src/components/Template/BaseInfoFormPackage.vue
  3. +88
    -49
      src/components/Template/CustomTable.vue
  4. +124
    -3
      src/components/Template/HandleFormItem.vue
  5. +3
    -0
      src/lang/en/business/study/studyMethod.js
  6. +7
    -1
      src/lang/en/template/commonTemplate.js
  7. +18
    -0
      src/lang/en/template/dl.js
  8. +2
    -0
      src/lang/zh/business/study/studyMethod.js
  9. +7
    -1
      src/lang/zh/template/commonTemplate.js
  10. +18
    -0
      src/lang/zh/template/dl.js
  11. +18
    -0
      src/utils/index.js
  12. +32
    -4
      src/views/business/comps/template/TemplateTable.vue
  13. +314
    -0
      src/views/business/comps/template/comps/dl/DL007.vue
  14. +339
    -0
      src/views/business/comps/template/comps/dl/DL008.vue
  15. +16
    -0
      src/views/business/comps/template/comps/dl/DL009.vue
  16. +16
    -0
      src/views/business/comps/template/comps/dl/DL010.vue
  17. +16
    -0
      src/views/business/comps/template/comps/dl/DL011.vue
  18. +16
    -0
      src/views/business/comps/template/comps/dl/DL012.vue
  19. +16
    -0
      src/views/business/comps/template/comps/dl/DL013.vue
  20. +16
    -0
      src/views/business/comps/template/comps/dl/DL014.vue
  21. +16
    -0
      src/views/business/comps/template/comps/dl/DL015.vue
  22. +39
    -23
      src/views/business/comps/template/comps/dl/DL016.vue
  23. +0
    -232
      src/views/business/comps/template/comps/dl/SYWZPZJHB.vue
  24. +2
    -2
      src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
  25. +441
    -0
      src/views/business/comps/template/comps/gsp/GSP001.vue
  26. +3
    -2
      src/views/business/comps/template/comps/gsp/GSP002.vue
  27. +2
    -2
      src/views/business/comps/template/comps/gsp/GSP003.vue
  28. +2
    -2
      src/views/business/comps/template/comps/gsp/GSP004.vue
  29. +2
    -2
      src/views/business/comps/template/comps/gsp/GSP009.vue
  30. +2
    -2
      src/views/business/comps/template/comps/gsp/GSP010.vue
  31. +1
    -3
      src/views/business/comps/template/comps/sp/SP001.vue
  32. +1
    -2
      src/views/business/comps/template/comps/sp/SP003.vue
  33. +1
    -2
      src/views/business/comps/template/comps/sp/SP00456.vue
  34. +23
    -5
      src/views/business/comps/template/comps/yp/YP003.vue
  35. +72
    -53
      src/views/business/comps/template/mixins/templateMixin.js
  36. +50
    -10
      src/views/business/form/nonTrial/comp/syffList.vue
  37. +2
    -1
      src/views/business/resource/gsp/comps/gsp/Xq.vue
  38. +2
    -1
      src/views/business/resource/gyzj/comps/gyzj/Xq.vue
  39. +2
    -1
      src/views/business/resource/mjy/comps/mjy/Xq.vue
  40. +12
    -3
      src/views/business/resource/sj/comps/Xq.vue
  41. +10
    -7
      src/views/business/study/comp/syffList.vue
  42. +3
    -2
      src/views/business/study/comp/syjList.vue
  43. +1
    -1
      src/views/business/study/comp/wzlb/bacteriaList.vue
  44. +2
    -2
      src/views/business/study/comp/wzlb/cellList.vue
  45. +1
    -1
      src/views/business/study/comp/wzlb/gspList.vue
  46. +1
    -1
      src/views/business/study/comp/wzlb/gyzjList.vue
  47. +1
    -1
      src/views/business/study/comp/wzlb/mjyList.vue
  48. +1
    -1
      src/views/business/study/comp/wzlb/sjList.vue
  49. +1
    -1
      src/views/business/study/comp/ytbd/Bj.vue
  50. +2
    -2
      vue.config.js

+ 9
- 0
src/api/business/sj/sj.js View File

@ -177,3 +177,12 @@ export function sj_configurationCompleted(data) {
data: data data: data
}) })
} }
// 详情pdf导出
export function exportDetail(query) {
return request({
url: '/system/business/sj/exportDetail',
method: 'get',
params: query
})
}

+ 13
- 0
src/components/Template/BaseInfoFormPackage.vue View File

@ -114,6 +114,13 @@
@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]"
@ -268,6 +275,12 @@
@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)"

+ 88
- 49
src/components/Template/CustomTable.vue View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="custom-table-wrapper" :class="{'no-border': !isBorder}">
<div class="custom-table-wrapper" :class="{ 'no-border': !isBorder }">
<div class="custom-table-header" v-if="isBorder"> <div class="custom-table-header" v-if="isBorder">
<div class="custom-table-row"> <div class="custom-table-row">
<div v-if="showSort" class="custom-table-cell header-cell sort-cell"> <div v-if="showSort" class="custom-table-cell header-cell sort-cell">
@ -19,8 +19,9 @@
:error="hasError(-1, index, col.headerSelectKey)" :error="hasError(-1, index, col.headerSelectKey)"
@update:error="onErrorUpdate(-1, index, col.headerSelectKey, $event)" /> @update:error="onErrorUpdate(-1, index, col.headerSelectKey, $event)" />
</template> </template>
<div v-else-if="headerSelectFields[col.headerSelectKey]" class="fill-type-icon" :style="{ width: (templateFillType !== 'actFill')? '60px' : 'auto' }">({{
headerSelectFields[col.headerSelectKey] }})</div>
<div v-else-if="headerSelectFields[col.headerSelectKey]" class="fill-type-icon"
:style="{ width: (templateFillType !== 'actFill') ? '60px' : 'auto' }">({{
headerSelectFields[col.headerSelectKey] }})</div>
</div> </div>
@ -42,7 +43,7 @@
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell" <div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell"
:style="getCellWidth(col)"> :style="getCellWidth(col)">
<div class="inner-table-cell"> <div class="inner-table-cell">
<div class="flex1" :class="{'item-center': !isBorder && col.label}">
<div class="flex1" :class="{ 'item-center': !isBorder && col.label }">
<div v-if="!isBorder && col.label" class="mr-5"> <div v-if="!isBorder && col.label" class="mr-5">
{{ $t(col.label) }} {{ $t(col.label) }}
</div> </div>
@ -54,7 +55,7 @@
@change="onBodyValueChange(rowIndex, colIndex, $event)" @change="onBodyValueChange(rowIndex, colIndex, $event)"
:error="hasError(rowIndex, colIndex, col.prop)" :error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
@beforeSaveRecord = "(data,callback)=>beforeSaveRecord(data,callback,rowIndex, col,row)"
@beforeSaveRecord="(data, callback) => beforeSaveRecord(data, callback, rowIndex, col, row)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</template> </template>
<template v-else-if="col.bodyType === 'inputNumber'"> <template v-else-if="col.bodyType === 'inputNumber'">
@ -65,7 +66,7 @@
@blur="onBlur(rowIndex, col.prop, $event)" @blur="onBlur(rowIndex, col.prop, $event)"
@change="onBodyValueChange(rowIndex, colIndex, $event)" @change="onBodyValueChange(rowIndex, colIndex, $event)"
:error="hasError(rowIndex, colIndex, col.prop)" :error="hasError(rowIndex, colIndex, col.prop)"
@beforeSaveRecord = "(data,callback)=>beforeSaveRecord(data,callback,rowIndex, col,row)"
@beforeSaveRecord="(data, callback) => beforeSaveRecord(data, callback, rowIndex, col, row)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</template> </template>
@ -75,7 +76,7 @@
:fieldItemLabel="fieldItemLabel" type="select" class="body-select" :fieldItemLabel="fieldItemLabel" type="select" class="body-select"
@blur="onBlur(rowIndex, col.prop, $event)" @blur="onBlur(rowIndex, col.prop, $event)"
:item="getBodyItem(col, rowIndex)" v-model="row[col.prop]" :item="getBodyItem(col, rowIndex)" v-model="row[col.prop]"
@change="onBodyValueChange(rowIndex, colIndex, $event,row,'select')"
@change="onBodyValueChange(rowIndex, colIndex, $event, row, 'select')"
:error="hasError(rowIndex, colIndex, col.prop)" :error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
@ -93,14 +94,13 @@
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</div> </div>
<div class="flex flex1" v-else-if="isRegent(col,'bodyType')">
<div class="flex flex1" v-else-if="isRegent(col, 'bodyType')">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" <HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable" :fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable"
sourceFrom = "customTable"
:item="getBodyItem(col, rowIndex)" :value="row[col.prop]"
:error="hasError(rowIndex, colIndex, col.prop)"
@onRegentSubmit="(data,inputValue)=>onRegentSubmit(data,inputValue,col, rowIndex, colIndex, row)"
@beforeReagentSubmit="(data, callback)=>onBeforeReagentSubmit(data, callback,col,row)"
sourceFrom="customTable" :item="getBodyItem(col, rowIndex)"
:value="row[col.prop]" :error="hasError(rowIndex, colIndex, col.prop)"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row)"
@beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, col, row)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</div> </div>
@ -109,10 +109,20 @@
{{ row[col.prop] }} {{ row[col.prop] }}
</div> </div>
</template> </template>
<template v-else-if="col.bodyType === 'span'">
<div class="body-span">
{{ row[col.prop] }}
<template v-else-if="col.bodyType === 'checkboxTag'">
<div class="flex flex-wrap">
<HandleFormItem v-for="(tag, tagIndex) in row[col.prop]" :key="tagIndex"
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex + '_' + tagIndex"
:fieldItemLabel="fieldItemLabel" type="checkboxTag"
@blur="onBlur(rowIndex, col.prop, $event)"
:value="tag"
:item="getBodyItem(col, rowIndex)"
@change="onCheckboxTagChange(rowIndex, colIndex,tagIndex, $event)"
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</div> </div>
</template> </template>
</div> </div>
@ -130,14 +140,15 @@
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.otherCode)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.otherCode)" />
</div> </div>
</div> </div>
<div class="m-l-5 flex1" v-if="isShowBodySub(col, row)">
<div class="m-l-5" :class="{ 'flex1': col.bodySubType !== 'button' }"
v-if="isShowBodySub(col, row)">
<template v-if="col.bodySubType === 'inputNumber'"> <template v-if="col.bodySubType === 'inputNumber'">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" <HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" type="inputNumber" :fieldItemLabel="fieldItemLabel" type="inputNumber"
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" @blur="onSubBlur(rowIndex, col.bodySubKey, $event)"
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" @copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)"
v-model="row[col.bodySubKey]" v-model="row[col.bodySubKey]"
@change="onBodySubValueChange(rowIndex, colIndex,$event,)"
@change="onBodySubValueChange(rowIndex, colIndex, $event,)"
:error="hasError(rowIndex, colIndex, col.bodySubKey)" :error="hasError(rowIndex, colIndex, col.bodySubKey)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
@ -148,7 +159,7 @@
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" @blur="onSubBlur(rowIndex, col.bodySubKey, $event)"
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" @copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)"
v-model="row[col.bodySubKey]" v-model="row[col.bodySubKey]"
@change="onBodySubValueChange(rowIndex, colIndex,$event,)"
@change="onBodySubValueChange(rowIndex, colIndex, $event,)"
:error="hasError(rowIndex, colIndex, col.bodySubKey)" :error="hasError(rowIndex, colIndex, col.bodySubKey)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
@ -158,7 +169,7 @@
:fieldItemLabel="fieldItemLabel" type="select" class="body-select" :fieldItemLabel="fieldItemLabel" type="select" class="body-select"
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" @blur="onSubBlur(rowIndex, col.bodySubKey, $event)"
:item="getBodySubItem(col, rowIndex)" v-model="row[col.bodySubKey]" :item="getBodySubItem(col, rowIndex)" v-model="row[col.bodySubKey]"
@change="onBodySubValueChange(rowIndex, colIndex, $event,row,'select')"
@change="onBodySubValueChange(rowIndex, colIndex, $event, row, 'select')"
:error="hasError(rowIndex, colIndex, col.bodySubKey)" :error="hasError(rowIndex, colIndex, col.bodySubKey)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" @update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> :orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
@ -169,12 +180,18 @@
{{ row[col.bodySubKey] }} {{ row[col.bodySubKey] }}
</div> </div>
</template> </template>
<template v-else-if="col.bodySubType === 'button'">
<HandleFormItem class="ml-10" type="button" :item="getBodyButtonItem(col, rowIndex)"
:value="row[col.bodySubKey]"
@clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" />
</template>
</div> </div>
</div> </div>
</div> </div>
<!-- 默认操作栏 --> <!-- 默认操作栏 -->
<div class="custom-table-cell body-cell" :style="{ width: isBorder ? '245px' : 'auto' }" v-if="showOperation">
<div class="custom-table-cell body-cell" :style="{ width: isBorder ? '245px' : 'auto' }"
v-if="showOperation">
<div class="inner-table-cell"> <div class="inner-table-cell">
<slot name="operation" :row="row" :rowIndex="rowIndex" :columns="getOperationColumns()"> <slot name="operation" :row="row" :rowIndex="rowIndex" :columns="getOperationColumns()">
</slot> </slot>
@ -300,14 +317,20 @@ export default {
this.oldLocalDataSource = []; this.oldLocalDataSource = [];
}, },
methods: { methods: {
beforeSaveRecord(data,callback,rowIndex, col,row){
this.$emit("beforeSaveRecord", {inputData:data, callback,rowIndex, key:col.prop, rowData:row,dataSource:this.localDataSource})
onCheckboxTagChange(rowIndex, colIndex,tagIndex, e) {
console.log(e,"eee")
},
handleClickButton(e, data, key, rowIndex, colIndex) {
this.$emit("clickButton", key, rowIndex, colIndex, e, data,)
},
beforeSaveRecord(data, callback, rowIndex, col, row) {
this.$emit("beforeSaveRecord", { inputData: data, callback, rowIndex, key: col.prop, rowData: row, dataSource: this.localDataSource })
}, },
getCellWidth(col){
const {templateFillType} = this;
getCellWidth(col) {
const { templateFillType } = this;
let width = col.width ? col.width + 'px' : 'auto'; let width = col.width ? col.width + 'px' : 'auto';
if(templateFillType !== "actFill" && templateFillType !== "preFill"){
width = (col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto')
if (templateFillType !== "actFill" && templateFillType !== "preFill") {
width = (col.showWidth) ? col.showWidth + 'px' : (col.width ? col.width + 'px' : 'auto')
} }
return { width } return { width }
}, },
@ -348,18 +371,18 @@ export default {
} }
this.$emit("clickable", col, rowIndex, row) this.$emit("clickable", col, rowIndex, row)
}, },
onBeforeReagentSubmit(data, callback, col, row){
onBeforeReagentSubmit(data, callback, col, row) {
if (this.templateFillType !== 'actFill') { if (this.templateFillType !== 'actFill') {
return return
} }
this.$emit("beforeReagentSubmit", {selectData:data, callback, key:col.prop, rowData:row})
this.$emit("beforeReagentSubmit", { selectData: data, callback, key: col.prop, rowData: row })
}, },
onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row){
onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row) {
if (this.templateFillType !== 'actFill') { if (this.templateFillType !== 'actFill') {
return return
} }
this.updateDataSourceByRowIndex(rowIndex,{[col.prop]:inputValue})
this.$emit("onRegentSubmit", {selectInfo:data,key:col.prop, col, rowIndex, colIndex, rowData:row})
this.updateDataSourceByRowIndex(rowIndex, { [col.prop]: inputValue })
this.$emit("onRegentSubmit", { selectInfo: data, key: col.prop, col, rowIndex, colIndex, rowData: row })
}, },
isShowAddRos() { isShowAddRos() {
if (this.showAddRow !== undefined) { if (this.showAddRow !== undefined) {
@ -374,7 +397,7 @@ export default {
if (this.isValueEmpty(this.localDataSource[rowIndex][col.copyFrom])) {// if (this.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")
this.onBlur(rowIndex, col.prop, this.localDataSource[rowIndex][col.prop]); this.onBlur(rowIndex, col.prop, this.localDataSource[rowIndex][col.prop]);
} }
}, },
@ -526,7 +549,7 @@ export default {
this.headerSelectFields[col.headerSelectTo] = value; this.headerSelectFields[col.headerSelectTo] = value;
} }
this.headerSelectFields[col.headerSelectKey] = value; this.headerSelectFields[col.headerSelectKey] = value;
this.$emit('headerSelectChange', {key:col.headerSelectKey, headerSelectFields:this.headerSelectFields,dataSource:this.localDataSource});
this.$emit('headerSelectChange', { key: col.headerSelectKey, headerSelectFields: this.headerSelectFields, dataSource: this.localDataSource });
// //
this.formErrors = this.formErrors.filter(error => this.formErrors = this.formErrors.filter(error =>
!(error.rowIndex === -1 && !(error.rowIndex === -1 &&
@ -588,7 +611,7 @@ export default {
}, },
// //
onBodyValueChange(rowIndex, colIndex, value,row,type) {
onBodyValueChange(rowIndex, colIndex, value, row, type) {
const col = this.columns[colIndex]; const col = this.columns[colIndex];
this.localDataSource[rowIndex][col.prop] = value; this.localDataSource[rowIndex][col.prop] = value;
@ -601,12 +624,12 @@ export default {
error.colIndex === colIndex && error.colIndex === colIndex &&
error.field === col.prop) error.field === col.prop)
); );
if(type === "select"){
this.$emit('bodySelectChange', {rowIndex,item:row, colIndex, value,key:col.prop,dataSource:this.localDataSource,headerSelectFields:this.headerSelectFields});
if (type === "select") {
this.$emit('bodySelectChange', { rowIndex, item: row, colIndex, value, key: col.prop, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields });
} }
}, },
// //
onBodySubValueChange(rowIndex, colIndex, value,row,type) {
onBodySubValueChange(rowIndex, colIndex, value, row, type) {
const col = this.columns[colIndex]; const col = this.columns[colIndex];
this.localDataSource[rowIndex][col.bodySubKey] = value; this.localDataSource[rowIndex][col.bodySubKey] = value;
@ -629,8 +652,8 @@ export default {
error.colIndex === colIndex && error.colIndex === colIndex &&
error.field === col.bodySubKey) error.field === col.bodySubKey)
); );
if(type === "select"){
this.$emit('bodySelectChange', {rowIndex,item:row, colIndex, value,key:col.bodySubKey,dataSource:this.localDataSource,headerSelectFields:this.headerSelectFields});
if (type === "select") {
this.$emit('bodySelectChange', { rowIndex, item: row, colIndex, value, key: col.bodySubKey, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields });
} }
}, },
getHeaderItem(col) { getHeaderItem(col) {
@ -651,13 +674,20 @@ export default {
copyFrom: col.copyFrom || "", copyFrom: col.copyFrom || "",
compareTo: col.compareTo, // compareTo compareTo: col.compareTo, // compareTo
type: col.bodyType || "input", type: col.bodyType || "input",
filledCodes:col.filledCodes,
filledCodes: col.filledCodes,
}; };
if (col.bodyDisabled) { if (col.bodyDisabled) {
item.disabled = col.bodyDisabled; item.disabled = col.bodyDisabled;
} }
return item return item
}, },
getBodyButtonItem(col,) {
return {
buttonName: col.bodySubButtonName,
fillType: col.bodySubFillType,
type: "button",
}
},
getBodySubItem(col) { getBodySubItem(col) {
const item = { const item = {
fillType: col.bodySubFillType, fillType: col.bodySubFillType,
@ -719,7 +749,7 @@ export default {
targetStartSolutionVolumePrecision: 3,//3 targetStartSolutionVolumePrecision: 3,//3
}); });
}, },
// //
addRow(row = {}) { addRow(row = {}) {
this.localDataSource.push(row); this.localDataSource.push(row);
@ -779,7 +809,7 @@ export default {
} }
} }
this.$emit("blur", { rowIndex, colKey, value,dataSource:this.localDataSource,headerSelectFields:this.headerSelectFields, item: this.localDataSource[rowIndex] });
this.$emit("blur", { rowIndex, colKey, value, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields, item: this.localDataSource[rowIndex] });
}, },
onSubBlur(rowIndex, colKey, value) { onSubBlur(rowIndex, colKey, value) {
// //
@ -810,13 +840,16 @@ export default {
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
margin-top: 20px; margin-top: 20px;
&.no-border { &.no-border {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: 5px 5px; border-radius: 5px 5px;
border: none; border: none;
.custom-table-cell { .custom-table-cell {
border-right: none; border-right: none;
} }
.custometable-row { .custometable-row {
display: flex; display: flex;
border-bottom: none; border-bottom: none;
@ -885,7 +918,7 @@ export default {
text-align: left; text-align: left;
vertical-align: middle; vertical-align: middle;
border-right: 1px solid #ebeef5; border-right: 1px solid #ebeef5;
page-break-inside: avoid;
page-break-inside: avoid;
box-sizing: border-box; box-sizing: border-box;
} }
@ -897,15 +930,15 @@ export default {
color: #909399; color: #909399;
background-color: #f5f7fa; background-color: #f5f7fa;
font-size: 12px; font-size: 12px;
word-break: break-word;
white-space: normal;
word-break: break-word;
white-space: normal;
} }
.body-cell { .body-cell {
color: #606266; color: #606266;
page-break-inside: avoid;
page-break-inside: avoid;
background-color: #fff; background-color: #fff;
} }
@ -980,15 +1013,21 @@ export default {
.body-span { .body-span {
text-align: center; text-align: center;
} }
.item-center { .item-center {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.mr-5{
.mr-5 {
margin-right: 5px; margin-right: 5px;
} }
.sort-cell{
.sort-cell {
text-align: center; text-align: center;
width: 100px; width: 100px;
} }
.flex-wrap{
flex-wrap: wrap;
}
</style> </style>

+ 124
- 3
src/components/Template/HandleFormItem.vue View File

@ -1,6 +1,6 @@
<template> <template>
<div class="flex " :class="type !=='radio' ? 'flex1' : ''">
<div class="flex" :class="type !=='radio' ? 'flex1' : ''">
<div class="flex " :class="getFlexClass()">
<div class="flex" :class="getFlexClass()">
<el-input v-if="type === 'input'" :maxlength="item.maxlength || 50" :disabled="getDisabled()" <el-input v-if="type === 'input'" :maxlength="item.maxlength || 50" :disabled="getDisabled()"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" @blur="onBlur" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" @blur="onBlur"
:placeholder="getPlaceholder()" v-model="inputValue" @input="onInputChange" @change="onInputChange" /> :placeholder="getPlaceholder()" v-model="inputValue" @input="onInputChange" @change="onInputChange" />
@ -89,6 +89,30 @@
<div slot="tip" class="el-upload__tip">支持扩展名.rar .zip .doc .docx .pdf .jpg文件大小不超过2MB</div> <div slot="tip" class="el-upload__tip">支持扩展名.rar .zip .doc .docx .pdf .jpg文件大小不超过2MB</div>
</el-upload> </el-upload>
</template> </template>
<div v-else-if="type === 'checkboxTag'" class="flex1 checkbox-tag-container"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')">
<div class="checkbox-tag-item">
<el-checkbox v-model="checkboxTagChecked" :disabled="getDisabled()" @change="onCheckboxTagChange"></el-checkbox>
<div class="tag-content blue-border" @click="onTagClick">
<el-input v-if="isEditingTag"
v-model="tagValue"
ref="tagInput"
:maxlength="item.maxlength || 20"
@blur="onTagBlur"
@keyup.enter.native="onTagBlur"
placeholder="请输入"
size="mini"
class="tag-input" />
<el-tag v-else
:type="'info'"
class="tag-display"
:closable="false">
{{ tagValue || '点击输入' }}
</el-tag>
</div>
<i class="el-icon-close delete-icon" @click="onDeleteTag" v-if="tagValue"></i>
</div>
</div>
</div> </div>
<div class="handle-row" v-if="isShowHandle()"> <div class="handle-row" v-if="isShowHandle()">
@ -218,7 +242,7 @@ export default {
}, },
data() { data() {
let initialValue = this.value; let initialValue = this.value;
let initialOtherValues = {};
let initialOtherValues = {},checkboxTagChecked = false,tagValue = '';
// checkboxListvalue // checkboxListvalue
if (this.type === 'checkboxList' && this.value && typeof this.value === 'object') { if (this.type === 'checkboxList' && this.value && typeof this.value === 'object') {
@ -226,6 +250,9 @@ export default {
initialOtherValues = this.value.otherValues || {}; initialOtherValues = this.value.otherValues || {};
} else if (this.type === 'checkboxList' && !Array.isArray(this.value)) { } else if (this.type === 'checkboxList' && !Array.isArray(this.value)) {
initialValue = []; initialValue = [];
}else if (this.type === 'checkboxTag' && this.value && typeof this.value === 'object') {
checkboxTagChecked = this.value.checked || false;
tagValue = this.value.tagValue || '';
} }
return { return {
inputValue: initialValue, inputValue: initialValue,
@ -241,6 +268,9 @@ export default {
replyContent: '', // replyContent: '', //
visible: false,// visible: false,//
checkboxValue: this.getChecked(),// checkboxValue: this.getChecked(),//
checkboxTagChecked: checkboxTagChecked, // checkboxTagcheckbox
tagValue: tagValue, // checkboxTagtag
isEditingTag: false, // tag
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: {},////
@ -255,9 +285,13 @@ export default {
}, },
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.inputValue = newVal.checkboxValues || [];
this.otherValues = newVal.otherValues || {}; this.otherValues = newVal.otherValues || {};
} else if (this.type === 'checkboxTag' && newVal && typeof newVal === 'object') {
this.checkboxTagChecked = newVal.checked || false;
this.tagValue = newVal.tagValue || '';
} else { } else {
this.inputValue = this.type === 'checkboxList' && !Array.isArray(newVal) ? [] : newVal; this.inputValue = this.type === 'checkboxList' && !Array.isArray(newVal) ? [] : newVal;
} }
@ -294,6 +328,10 @@ export default {
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit) EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit)
}, },
methods: { methods: {
getFlexClass(){
const noFlexArr = ["radio","checkboxTag"]
return noFlexArr.includes(this.type) ? '' : 'flex1'
},
getDecimalDigits(){ getDecimalDigits(){
const {precision} = this.item; const {precision} = this.item;
if(!isNaN(precision)){ if(!isNaN(precision)){
@ -774,6 +812,40 @@ export default {
this.otherValues[code] = value; this.otherValues[code] = value;
this.onInputChange(); this.onInputChange();
}, },
// checkboxTagcheckbox
onCheckboxTagChange() {
this.emitCheckboxTagValue();
},
// tag
onTagClick() {
this.isEditingTag = true;
this.$nextTick(() => {
this.$refs.tagInput && this.$refs.tagInput.focus();
});
},
// tag
onTagBlur() {
this.isEditingTag = false;
this.emitCheckboxTagValue();
//
if (this.tagValue) {
this.onCommonHandleSaveRecord(this.tagValue);
}
},
// tag
onDeleteTag() {
this.tagValue = '';
this.emitCheckboxTagValue();
this.onCommonHandleSaveRecord('');
},
// checkboxTag
emitCheckboxTagValue() {
const value = {
checked: this.checkboxTagChecked,
tagValue: this.tagValue
};
this.$emit('change', value);
},
// //
onBlur(e) { onBlur(e) {
this.onCommonHandleSaveRecord(e.target.value); this.onCommonHandleSaveRecord(e.target.value);
@ -927,6 +999,9 @@ export default {
} }
if(this.type === "button"){ if(this.type === "button"){
this.$emit('clickButton', this.item,this.inputValue,data); this.$emit('clickButton', this.item,this.inputValue,data);
if(this.templateFillType === "preFill"){
return;
}
} }
// //
this.oldValue = value; // this.oldValue = value; //
@ -1569,4 +1644,50 @@ export default {
border-color: #f9c588; border-color: #f9c588;
} }
} }
// checkboxTag
.checkbox-tag-container {
border-radius: 4px;
// transition: all 0.3s;
margin-bottom: 5px;
margin-right: 5px;
&.error-border {
border-color: #ff5d5d !important;
box-shadow: 0 0 6px #ffc3c3 !important;
}
.checkbox-tag-item {
display: flex;
align-items: center;
gap: 8px;
.tag-content {
cursor: pointer;
.tag-input {
width: 100px;
}
.tag-display {
cursor: pointer;
user-select: none;
}
}
.delete-icon {
cursor: pointer;
color: #909399;
font-size: 14px;
padding: 2px;
border-radius: 50%;
// transition: all 0.3s;
&:hover {
color: #ff5d5d;
background-color: #f5f5f5;
}
}
}
}
</style> </style>

+ 3
- 0
src/lang/en/business/study/studyMethod.js View File

@ -17,6 +17,9 @@ export default {
qmsj: 'Date', qmsj: 'Date',
qmyy: 'Meaning of Signature', qmyy: 'Meaning of Signature',
remark: 'Comment', remark: 'Comment',
ts: '',
gbts: 'This method has been closed, no need to read!',
jcyd: '坚持阅读',
qyd:'Go Read', qyd:'Go Read',
gb: 'Close', gb: 'Close',
sfgb: 'Closed', sfgb: 'Closed',

+ 7
- 1
src/lang/en/template/commonTemplate.js View File

@ -20,6 +20,12 @@ export default {
jtpz:'阶梯配制', jtpz:'阶梯配制',
// 字段标签 // 字段标签
sjInfo:'Reagent Info',
gyzjInfo:'Formulation Info',
gspInfo:'Specimen Info',
gspsywzInfo:'试验物资信息',
mjyInfo:'Controlled Drug Info',
storageConditionLabel: 'Storage Condition', storageConditionLabel: 'Storage Condition',
testName: 'Study Name', testName: 'Study Name',
testNumber: 'Study Number', testNumber: 'Study Number',
@ -64,7 +70,7 @@ export default {
reagentExpireDate: 'Expiration Date', reagentExpireDate: 'Expiration Date',
// 物资信息列 // 物资信息列
wzName: 'Name',
wzName: 'Name/Code',
wzCode: 'Item Number', wzCode: 'Item Number',
wzConcentration: 'Concentration', wzConcentration: 'Concentration',
wzSource: 'Source', wzSource: 'Source',

+ 18
- 0
src/lang/en/template/dl.js View File

@ -1,6 +1,24 @@
//毒理 //毒理
export default { export default {
dl001: {}, dl001: {},
dl007: {
sydd: 'Test Location',
yqsyxx: 'Instrument Usage Information',
yqbh: 'Instrument Number',
yqmc: 'Instrument Name',
yqxh: 'Instrument Model',
xccsjzjdrq: 'Next Test/Calibration/Verification Date',
czxx: 'Operation Information',
qxbd: 'Previous Form',
pykssj: 'Cultivation Start Time',
pyjssj: 'Cultivation End Time',
jsButton: 'End',
bz: 'Remarks'
},
dl008: {
cxqk: 'Imaging Status',
wrqk: 'Contamination Status'
},
dl020: { dl020: {
swdljlbxx: '毒理记录表信息', swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息', xbxx:'细胞信息',

+ 2
- 0
src/lang/zh/business/study/studyMethod.js View File

@ -20,6 +20,8 @@ export default {
qyd:'去阅读', qyd:'去阅读',
gb: '关闭', gb: '关闭',
sfgb: '是否关闭', sfgb: '是否关闭',
gbts: '该方法已关闭,无需阅读!',
jcyd: '坚持阅读',
s: '是', s: '是',
f: '否', f: '否',
qrgb: '确认关闭?', qrgb: '确认关闭?',

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

@ -4,6 +4,12 @@ export default {
// 标签 // 标签
baseInfo: '试验基本信息', baseInfo: '试验基本信息',
sjInfo:'试验试剂信息',
gyzjInfo:'给药制剂信息',
gspInfo:'供试品信息',
gspsywzInfo:'试验物资信息',
mjyInfo:'麻精药信息',
reagentInfo: '试验试剂信息', reagentInfo: '试验试剂信息',
wzInfo: '试验物资信息', wzInfo: '试验物资信息',
instrumentInfo: '仪器使用信息', instrumentInfo: '仪器使用信息',
@ -65,7 +71,7 @@ export default {
reagentExpireDate: '失效日', reagentExpireDate: '失效日',
// 物资信息列 // 物资信息列
wzName: '名称',
wzName: '名称/代号',
wzCode: '编号', wzCode: '编号',
wzConcentration: '浓度', wzConcentration: '浓度',
wzSource: '物资来源', wzSource: '物资来源',

+ 18
- 0
src/lang/zh/template/dl.js View File

@ -1,6 +1,24 @@
//毒理 //毒理
export default { export default {
dl001: {}, dl001: {},
dl007: {
sydd: '试验地点',
yqsyxx: '仪器使用信息',
yqbh: '仪器编号',
yqmc: '仪器名称',
yqxh: '仪器型号',
xccsjzjdrq: '下次测试/校准/检定日期',
czxx: '操作信息',
qxbd: '前序表单',
pykssj: '培养开始时间',
pyjssj: '培养结束时间',
jsButton: '结束',
bz: '备注'
},
dl008: {
cxqk: '成像情况',
wrqk: '污染情况'
},
dl020: { dl020: {
swdljlbxx: '毒理记录表信息', swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息', xbxx:'细胞信息',

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

@ -563,3 +563,21 @@ export function isRegent(item, fieldCode = 'type') {
] ]
return typeList.includes(type) return typeList.includes(type)
} }
/**
* 估算字符串在 Excel 中的显示宽度简单规则中文字符算2英文字符算1
* @param {string} str 要计算的字符串
* @returns {number} 估算宽度
*/
export function getStringWidth(str) {
if (!str) return 0
let width = 0
for (let char of str.toString()) {
// 中文字符范围(可根据需要扩展)
if (/[\u4e00-\u9fa5]/.test(char)) {
width += 2
} else {
width += 1
}
}
return width
}

+ 32
- 4
src/views/business/comps/template/TemplateTable.vue View File

@ -33,6 +33,7 @@ import SP009 from "./comps/sp/SP009.vue";
import SP0019 from "./comps/sp/SP0019.vue"; import SP0019 from "./comps/sp/SP0019.vue";
import Demo from "./comps/sp/Demo.vue"; import Demo from "./comps/sp/Demo.vue";
// //
import GSP001 from "./comps/gsp/GSP001.vue";
import GSP002 from "./comps/gsp/GSP002.vue"; import GSP002 from "./comps/gsp/GSP002.vue";
import GSP003 from "./comps/gsp/GSP003.vue"; import GSP003 from "./comps/gsp/GSP003.vue";
import GSP004 from "./comps/gsp/GSP004.vue"; import GSP004 from "./comps/gsp/GSP004.vue";
@ -77,6 +78,15 @@ import YP005 from "./comps/yp/YP005.vue";
// //
// DL001-SYWZPZJHB // DL001-SYWZPZJHB
// DL002-使SP001 // DL002-使SP001
import DL007 from './comps/dl/DL007.vue'
import DL008 from './comps/dl/DL008.vue'
import DL009 from './comps/dl/DL009.vue'
import DL010 from './comps/dl/DL010.vue'
import DL011 from './comps/dl/DL011.vue'
import DL012 from './comps/dl/DL012.vue'
import DL013 from './comps/dl/DL013.vue'
import DL014 from './comps/dl/DL014.vue'
import DL015 from './comps/dl/DL015.vue'
import DL016 from "./comps/dl/DL016.vue"; import DL016 from "./comps/dl/DL016.vue";
import DL020 from "./comps/dl/DL020.vue"; import DL020 from "./comps/dl/DL020.vue";
@ -89,7 +99,7 @@ export default {
//// ////
MJYLQSQD, SYWZPZJHB, DMYPPZJLB, MJYLQSQD, SYWZPZJHB, DMYPPZJLB,
// //
GSP002, GSP003, GSP004,GSP009, GSP010,
GSP001,GSP002, GSP003, GSP004,GSP009, GSP010,
// //
SP001, SP003, SP00456,SP007, SP008, SP009,SP0019, SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,
// PCR // PCR
@ -106,7 +116,16 @@ export default {
YP003, YP003,
YP004, YP004,
YP005, YP005,
//
//
DL007,
DL008,
DL009,
DL010,
DL011,
DL012,
DL013,
DL014,
DL015,
DL016, DL016,
DL020 DL020
}, },
@ -124,7 +143,6 @@ export default {
handleEditSignCancel(e) { handleEditSignCancel(e) {
EventBus.$emit('edit-sign-cancel', e); EventBus.$emit('edit-sign-cancel', e);
}, },
}, },
props: { props: {
sn: { sn: {
@ -171,7 +189,7 @@ export default {
'SP019': 'SP0019', 'SP019': 'SP0019',
// //
'GSP001': 'DMYPPZJLB',
'GSP001': 'GSP001',
'GSP002': 'GSP002', 'GSP002': 'GSP002',
'GSP003': 'GSP003', 'GSP003': 'GSP003',
'GSP004': 'GSP004', 'GSP004': 'GSP004',
@ -215,6 +233,16 @@ export default {
'YP005': 'YP005', 'YP005': 'YP005',
// //
//DL001-SYWZPZJHB //DL001-SYWZPZJHB
'DL002': 'SP001',
'DL007': 'DL007',
'DL008': 'DL008',
'DL009': 'DL009',
'DL010': 'DL010',
'DL011': 'DL011',
'DL012': 'DL012',
'DL013': 'DL013',
'DL014': 'DL014',
'DL015': 'DL015',
'DL016': 'DL016', 'DL016': 'DL016',
'DL020': 'DL020', 'DL020': 'DL020',
} }

+ 314
- 0
src/views/business/comps/template/comps/dl/DL007.vue View File

@ -0,0 +1,314 @@
<!-- Ames实验掺入法平皿培养记录表 -->
<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="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.czxx"
label="template.dl.dl007.czxx"
:ref="refConf.czInfo"
:formConfig="czInfoFormConfig"
:formData="formData"
@clickButton="handleClickButton"
@onRegentSubmit="onRegentSubmit"
/>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
label="template.dl.dl007.bz"
:ref="refConf.remark"
:formConfig="remarkConig"
:formData="formData"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage'
import TableOpertaionDelete from '@/components/Template/operation/TableOpertaionDelete.vue'
import CustomTable from '@/components/Template/CustomTable.vue'
import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
const refConf = {
base: 'baseInfoRef',
yqsy: 'yqsyTableRef',
czInfo: 'czInfoRef',
remark: 'remarkRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL007',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete
},
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill'
}
},
computed: {
//
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: 'conditionItem',
label: 'template.dl.dl007.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
fillType: 'actFill',
otherCode: 'syddOther'
}
}
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: 'input',
disabled: true
},
endDate: {
label: 'template.common.endTime',
type: 'input',
disabled: true
}
}
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl007.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl007.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
//
czInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
pykssj: {
label: 'template.dl.dl007.pykssj',
fillType: 'actFill',
type: 'input',
disabled: true
},
pyjssj: {
label: 'template.dl.dl007.pyjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'pyjssjButton',
buttonName: 'template.dl.dl007.jsButton'
}
}
}
]
}
},
data() {
return {
formData: {},
refConf
}
},
methods: {
//
deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
handleClickButton(_item, signData) {
this.$refs.czInfoRef.updateFormData(
'pyjssj',
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
},
//
async getFormData() {
return await this.validFormFields(refNames)
},
//
async validFields() {
return await this.validFormFields(refNames)
},
getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
jzrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.czInfoRef.updateFormData('pykssj', row.startDate)
}
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 339
- 0
src/views/business/comps/template/comps/dl/DL008.vue View File

@ -0,0 +1,339 @@
<!-- Ames试验平皿成像确认记录表 -->
<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="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<!-- 成像情况 -->
<LineLabel label="template.dl.dl008.cxqk" />
<BaseInfoFormPackage
:ref="refConf.cxqkqxbb"
:formConfig="cxqkqxbbInfoFormConfig"
:formData="formData"
@clickButton="handleClickButton"
@onRegentSubmit="onRegentSubmit"
/>
<CustomTable
:columns="cxqkColumns"
:ref="refConf.cxqk"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:formData="formData"
:prefixKey="`cxqkTable`"
>
</CustomTable>
<BaseInfoFormPackage
:ref="refConf.cxqkwrqk"
:formConfig="cxqkwrqkConfig"
:formData="formData"
/>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
label="template.dl.dl007.bz"
:ref="refConf.remark"
:formConfig="remarkConfig"
:formData="formData"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage'
import TableOpertaionDelete from '@/components/Template/operation/TableOpertaionDelete.vue'
import CustomTable from '@/components/Template/CustomTable.vue'
import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
const refConf = {
base: 'baseInfoRef',
yqsy: 'yqsyTableRef',
cxqkqxbb: 'cxqkqxbbInfoRef',
cxqk: 'cxqkTableRef',
cxqkwrqk: 'cxqkwrqkInfoRef',
remark: 'remarkRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL008',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete
},
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill'
}
},
computed: {
//
remarkConfig() {
return [
{
type: 'cellItem',
config: {
remark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
// -
cxqkwrqkConfig() {
return [
{
type: 'conditionItem',
config: {
cxqkwrqk: {
// ''
span: 1,
label: 'template.dl.dl008.wrqk',
type: 'select',
options: this.getDictOptions('business_dl_ameswrqk'),
fillType: 'actFill',
otherCode: 'cxqkwrqkOther'
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: 'cardItem',
config: {
studyMc: {
label: 'template.common.testName',
type: 'input',
disabled: true
},
studySn: {
label: 'template.common.testNumber',
type: 'input',
disabled: true
}
}
},
{
type: 'conditionItem',
label: 'template.dl.dl007.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
fillType: 'actFill',
otherCode: 'syddOther'
}
}
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: 'input',
disabled: true
},
endDate: {
label: 'template.common.endTime',
type: 'input',
disabled: true
}
}
}
]
},
// - TODO:
cxqkColumns() {
return []
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl007.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl007.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
// -
cxqkqxbbInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
cxqkqxbd: {
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
}
}
}
]
}
},
data() {
return {
formData: {},
refConf
}
},
mounted() {},
methods: {
//
deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
handleClickButton(_item, signData) {
this.$refs.cxqkqxbbInfoRef.updateFormData(
'pyjssj',
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
},
//
async getFormData() {
return await this.validFormFields(refNames)
},
//
async validFields() {
return await this.validFormFields(refNames)
},
getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
jzrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.cxqkqxbbInfoRef.updateFormData('pykssj', row.startDate)
}
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL009.vue View File

@ -0,0 +1,16 @@
<!-- Ames试验掺入法观察结果记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL009',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL010.vue View File

@ -0,0 +1,16 @@
<!-- 骨髓收集记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL010',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -0,0 +1,16 @@
<!-- 细胞复苏记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL011',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -0,0 +1,16 @@
<!-- 细胞制备记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL012',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -0,0 +1,16 @@
<!-- 细胞密度测定记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL013',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -0,0 +1,16 @@
<!-- 细胞给药/观察记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL014',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 16
- 0
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -0,0 +1,16 @@
<!-- 细胞换液/观察记录表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'DL015',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>

+ 39
- 23
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -11,7 +11,7 @@
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> <TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.yp.yp004.zbxx" />
<LineLabel label="template.dl.dl016.qcxjjyqk" />
<CustomTable <CustomTable
:ref="`tableRef`" :ref="`tableRef`"
@ -26,7 +26,11 @@
</template> </template>
</CustomTable> </CustomTable>
<LineLabel label="template.yp.yp004.zbbz" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl016.xbxx" label="template.dl.dl016.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl016.zbbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step> <Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
@ -99,31 +103,19 @@ export default {
} }
}, },
{ {
type: "conditionItem",
label: 'template.yp.yp004.pztj',
type: "cellItem",
label: 'template.dl.dl016.sydd',
config: { config: {
pre: { pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
label: 'template.dl.dl016.sydd',
type: "input",
fillType: "actFill", fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
},
} }
}, },
{ {
type: "cellItem", type: "cellItem",
label: 'template.lba.lba002.czsj',
label: 'template.dl.dl016.czsj',
config: { config: {
startDate: { startDate: {
label: 'template.common.startTime', label: 'template.common.startTime',
@ -137,24 +129,48 @@ export default {
} }
] ]
}, },
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl016.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
pre: {
label: 'template.dl.dl016.preFill',
type: "select",
fillType: "preFill",
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: "preOther",
},
}
},
]
},
// //
tableColumns() { tableColumns() {
return [{ return [{
label: 'template.yp.yp004.zbdx',
label: 'template.dl.dl016.zbdx',
prop: 'zbdx', prop: 'zbdx',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill', bodyFillType: 'preFill',
width: 280, width: 280,
bodyMaxlength: 50, bodyMaxlength: 50,
},{ },{
label: 'template.yp.yp004.yjzbs',
label: 'template.dl.dl016.yjzbs',
prop: 'yjzbs', prop: 'yjzbs',
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'preFill', bodyFillType: 'preFill',
width: 280, width: 280,
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: 'template.yp.yp004.sjzbs',
label: 'template.dl.dl016.sjzbs',
prop: 'sjzbs', prop: 'sjzbs',
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',

+ 0
- 232
src/views/business/comps/template/comps/dl/SYWZPZJHB.vue View File

@ -1,232 +0,0 @@
<!-- 试验物质配制计划表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">试验物质配制计划表<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
:formData="formData" />
<LineLabel label="计划信息" />
<div class="template-form-item">
<BaseInfoFormPackage ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable @blur="onHandleTableBlur" :showHeaderSelect="fillType === 'actFill'" :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns"
:formData="formData" >
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow"></TableOpertaion>
</template>
</CustomTable>
<div class="add-row">
<el-button type="primary" plain @click="addRow">添加行</el-button>
</div>
</div>
<BaseInfoFormPackage label="特别说明" ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
<button @click="onSave">保存</button>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
export default {
name: "SYWZPZJHB",
components: { BaseInfoFormPackage, LineLabel, CustomTable, TableOpertaion },
mixins: [templateMixin],
props: {
value: {
type: {},
default: () => { },
},
fillType: {
type: String,
default: 'preFill',
},
},
watch: {
value: {
immediate: true,
handler(v) {
}
},
fillType: {
immediate: true,
handler(v) {
console.log(v,"fillType")
}
},
},
computed: {
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: "请输入特别说明",
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: "试验名称",
type: "input",
disabled: true,
},
studySn: {
label: "试验编号",
type: "input",
disabled: true,
},
}
},
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
drawTime: {
label: "领取时间",
type: "input",
fillType: "actFill",
},
analyzeTime: {
label: "分析时间",
type: "input",
fillType: "actFill",
},
testSubstance: {
label: "试验物质",
type: "input",
fillType: "actFill",
},
configFrequency: {
label: "配置频率",
type: "input",
fillType: "actFill",
},
}
}
]
},
//
stepColumns() {
return [
{
label: "给药剂量或组别",
prop: "startSolutionCode",
width: 280,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 50,
},
{
label: "配制浓度",
prop: "preparationConcentration",
width: 280,
headerSelectKey: "preparationConcentrationUnit",
fillType: "actFill",
headerOptions: this.getDictOptions('business_nddw'),
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 50,
},
{
label: "配制体积",
prop: "preparationVolume",
width: 280,
headerSelectKey: "preparationVolumeUnit",
fillType: "actFill",
headerOptions: this.getDictOptions('business_tjdw'),
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 50,
},
]
},
},
data() {
return {
selectReagentVisible: false,
subSolutionVisible: false,
currentSubKey: "",//key
dataSource: [],
stepTableDataSource: [],
};
},
mounted() {
},
methods: {
async getFormData() {
const baseData = await this.$refs.baseInfoRef.getFormData();
const stepFormData = await this.$refs.stepFormPackageRef.getFormData();
const stepTableFormData = await this.$refs.stepTableRef.getFormData();
const remarkData = await this.$refs.remarkRef.getFormData();
if(!stepTableFormData.stepTableFormData.length){
this.$message.error("请添加计划信息");
return;
}
return {
...baseData,
...stepFormData,
...remarkData,
...stepTableFormData
}
},
async onSave() {
const formData = await this.getFormData();
// const formData = await this.$refs.stepTableRef.getFormData();
console.log(formData, "formData")
},
//
addRow() {
this.$refs.stepTableRef.addRow({
startSolutionCode: "",
preparationConcentration: "",
preparationVolume: "",
})
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.add-row{
display: flex;
justify-content: center;
padding: 20px 0;
}
</style>

+ 2
- 2
src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue View File

@ -10,8 +10,8 @@
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<!-- 基本信息 --> <!-- 基本信息 -->
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.gyzjInfo" :columns="gyzjColumns" :dataSource="resourceGyzj" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 存储条件 --> <!-- 存储条件 -->
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" <BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"

+ 441
- 0
src/views/business/comps/template/comps/gsp/GSP001.vue View File

@ -0,0 +1,441 @@
<!-- 供试品部试剂配制记录表 -->
<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.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 存储条件 -->
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<!-- 操作步骤 -->
<div v-for="(formConfig, ladderIndex) in formData.formConfigs" :key="'ladder_' + ladderIndex">
<div class="template-form-item">
<div class="config-header-right">
<el-button v-if="fillType === 'preFill'" type="primary" @click="handleAddFormConfig">{{
$t('template.common.addBtn') }}</el-button>
<el-button v-if="fillType === 'preFill' && formData.formConfigs.length > 1"
type="danger" @click="handleDeleteFormConfig(ladderIndex)">{{
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formConfigStepFormPackageRef_${ladderIndex}`" :formConfig="stepFormConfig"
:formData="formConfig" />
<Step class="mt-0 s-container" :ref="`formStepRef_${ladderIndex}`"
:formData="formConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + ladderIndex"></Step>
</div>
</div>
<!-- 备注 -->
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
</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 CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import { duplicateResource, getExpireDate } from "@/utils/index.js";
export default {
name: "DMYPPZJLB",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
//
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,
},
methodCode: {
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
prepend: "V",
maxlength: 50
},
}
},
{
type: "conditionItem",
label: 'template.common.testConfigurationConditions',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
targetName: {
label: 'template.common.targetSolutionName',
type: "input",
fillType: "preFill",
maxlength: 50
},
targetCode: {
label: 'template.common.targetSolutionCode',
type: "input",
subType: "span",
fillType: "preFill",
subKey: "targetCodeSn",
maxlength: 20
},
targetPreConcentration: {
label: 'template.common.targetPreConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetPreConcentrationUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo: "targetActConcentrationUnit",//
},
targetActConcentration: {
label: 'template.common.targetActConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetActConcentrationUnit",
compareTo: "targetPreConcentration",//
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
copyFrom: "targetPreConcentration",//
maxlength: 10
},
targetPreVolume: {
label: 'template.common.targetPreVolume',
type: "inputNumber",
subType: "select",
subKey: "targetPreVolumeUnit",
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
selectTo: "targetActVolumeUnit",//
},
targetActVolume: {
label: 'template.common.targetActVolume',
type: "inputNumber",
subType: "select",
subKey: "targetActVolumeUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
compareTo: "targetPreVolume",//
copyFrom: "targetPreVolume",//
maxlength: 10
},
effectivePeriod: {
label: 'template.common.effectivePeriod',
type: "inputNumber",
subType: "select",
subKey: "effectivePeriodUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_yxqdw'),
maxlength: 10
},
expireDate: {
label: 'template.common.expireDate',
type: "input",
},
}
}
]
},
},
data() {
return {
formData: {}
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
if (!formData.targetCodeSn && this.fillType === "actFill") {
this.getCode(formData);
} else {
if (!this.formData.formConfigs) {
this.$set(this.formData, 'formConfigs', []);
this.formData.formConfigs.push({
formConfigs: [],
});
}
}
},
methods: {
//
handleAddFormConfig() {
if (!this.formData.formConfigs) {
this.$set(this.formData, 'formConfigs', []);
}
this.formData.formConfigs.push({
formConfigs: [],
});
},
//
handleDeleteFormConfig(index) {
this.formData.formConfigs.splice(index, 1);
},
//todo
printTag() {
const printConfig = this.getBasePrintConfig();
const { storageCondition, targetCodeSn } = this.formData;
printConfig["存储条件"] = storageCondition;
printConfig["编号"] = targetCodeSn;
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
getCode: debounce(async function (v) {
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
let item = this.formData.formConfigs[i]
const result = await getLatestSn({
count: 1,
pre: item.targetCode,
type: 1
})
if (result.code == 200) {
this.$refs[`formConfigStepFormPackageRef_${i}`][0].updateFormData("targetCodeSn", result.data[0])
}
}
}
}, 100),
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const conditionData = this.$refs.storageConditionRef.getFilledFormData();
const formConfigsData = [];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
const formData = this.$refs[`formConfigStepFormPackageRef_${i}`][0].getFilledFormData();
const stepData = this.$refs[`formStepRef_${i}`][0].getFilledFormData();
if(this.formData.startDate&&formData.effectivePeriod&&formData.effectivePeriodUnit){
formData.expireDate=getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit)
}
formConfigsData.push({
...formData,
...stepData,
});
}
}
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...conditionData,
formConfigs: formConfigsData,
...remarkData
}
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
refsToValidate.push(`formConfigStepFormPackageRef_${i}`);
refsToValidate.push(`formStepRef_${i}`);
}
}
return await this.validFormFields(refsToValidate);
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content;
},
//使
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.formConfigs
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
tmpResource.push({
mc: item.targetName,
bh: item.targetCode + item.targetCodeSn,
ph: '',
ndz: item.targetActConcentration + item.targetActConcentrationUnit,
nd: item.targetActConcentration,
nddw: item.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: item.expireDate,
kc: item.targetActVolume,
kcdw: item.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: item.targetActVolumeUnit,
yxzq: item.effectivePeriod,
yxzqdw: item.effectivePeriodUnit,
})
}
}
}
//使
const stepResource = this.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//使
getStepResource() {
const sjResource = [], yqResource = [];
if (this.formData.formConfigs && this.formData.formConfigs.length > 0) {
for (let i = 0; i < this.formData.formConfigs.length; i++) {
const paralleResource = this.$refs[`formStepRef_${i}`][0].getStepResource();
sjResource.push(...paralleResource.sjResource);
yqResource.push(...paralleResource.yqResource);
}
}
//
const { sj, yq } = duplicateResource(sjResource, yqResource)
return { sjResource: sj, yqResource: yq };
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-right {
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
text-align: right;
width: 100%;
}
</style>

+ 3
- 2
src/views/business/comps/template/comps/gsp/GSP002.vue View File

@ -8,8 +8,9 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" v-if="sn!='GSP002'"/>
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel v-if="sn=='GSP002'" label="template.common.operationSteps" /> <LineLabel v-if="sn=='GSP002'" label="template.common.operationSteps" />

+ 2
- 2
src/views/business/comps/template/comps/gsp/GSP003.vue View File

@ -10,8 +10,8 @@
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<!-- 基本信息 --> <!-- 基本信息 -->
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 存储条件 --> <!-- 存储条件 -->
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" <BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"

+ 2
- 2
src/views/business/comps/template/comps/gsp/GSP004.vue View File

@ -8,8 +8,8 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 计算公式 --> <!-- 计算公式 -->
<BaseInfoFormPackage fieldItemLabel="template.gsp.GSP003.calcConditionLabel" <BaseInfoFormPackage fieldItemLabel="template.gsp.GSP003.calcConditionLabel"

+ 2
- 2
src/views/business/comps/template/comps/gsp/GSP009.vue View File

@ -8,8 +8,8 @@
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel :label="sn=='GSP009'?'template.gsp.gsp009.xtsyx':'template.gsp.gsp011.cl'" /> <LineLabel :label="sn=='GSP009'?'template.gsp.gsp009.xtsyx':'template.gsp.gsp011.cl'" />

+ 2
- 2
src/views/business/comps/template/comps/gsp/GSP010.vue View File

@ -10,8 +10,8 @@
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<!-- 基本信息 --> <!-- 基本信息 -->
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.gspsywzInfo" :columns="gspColumns" :dataSource="resourceGsp" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" /> <LineLabel label="template.common.operationSteps" />
<!-- 操作步骤 --> <!-- 操作步骤 -->

+ 1
- 3
src/views/business/comps/template/comps/sp/SP001.vue View File

@ -8,9 +8,7 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz"
v-if="resourceWz.length > 0" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" <BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef" label="template.common.storageCondition" ref="storageConditionRef"

+ 1
- 2
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -8,8 +8,7 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- <BaseInfoFormPackage label="存储条件" ref="storageConditionRef" :formConfig="storageFormConfig" <!-- <BaseInfoFormPackage label="存储条件" ref="storageConditionRef" :formConfig="storageFormConfig"
:formData="formData" /> --> :formData="formData" /> -->

+ 1
- 2
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -8,8 +8,7 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" <BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef" label="template.common.storageCondition" ref="storageConditionRef"

+ 23
- 5
src/views/business/comps/template/comps/yp/YP003.vue View File

@ -19,6 +19,7 @@
:formData="formData" :formData="formData"
:prefixKey = "`table`" :prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps" fieldItemLabel = "template.common.operationSteps"
@clickButton="handleClickButton"
:showOperation="fillType === 'preFill'" :showOperation="fillType === 'preFill'"
> >
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
@ -34,9 +35,6 @@
</div> </div>
</div> </div>
<!-- <button @click="onSave">保存</button> --> <!-- <button @click="onSave">保存</button> -->
<el-button type="primary" @click="showImportExcelDialog">{{ $t('template.common.importTemplate')
}}</el-button>
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" :downloadArr="['动物编号']" @downloadExcelTemplate="downloadExcelTemplate" /> <ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" :downloadArr="['动物编号']" @downloadExcelTemplate="downloadExcelTemplate" />
</div> </div>
</template> </template>
@ -166,8 +164,13 @@ export default {
},{ },{
label: 'template.yp.yp003.dwbh', label: 'template.yp.yp003.dwbh',
prop: 'dwbh', prop: 'dwbh',
bodyType: 'input',
bodyType: 'checkboxTag',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodySubType:"button",
bodySubFillType:"preFill",
bodySubButtonName:"template.common.importTemplate",
bodySubKey:"exportBtn",
showBodySub:true,
width: 280, width: 280,
},{ },{
label: 'template.yp.yp003.ypsl', label: 'template.yp.yp003.ypsl',
@ -181,11 +184,19 @@ export default {
data() { data() {
return { return {
formData: {}, formData: {},
currentRowIndex: -1,
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
//
handleClickButton(key,rowIndex,colIndex,e,data){
if(key === "exportBtn"){
this.currentRowIndex = rowIndex;
this.$refs.ImportExcelDialog.show()
}
},
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]) return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"])
@ -220,7 +231,14 @@ export default {
this.$refs.ImportExcelDialog.show() this.$refs.ImportExcelDialog.show()
}, },
onLoadExcelData(excelData) { onLoadExcelData(excelData) {
console.log(excelData)
const data = excelData.splice(1);
const tagData = data.map((item)=>{
return {
checked:false,
tagValue:item[0],
}
})
this.$refs.tableRef.updateDataSourceByRowIndex(this.currentRowIndex,{dwbh:tagData});
this.$refs.ImportExcelDialog.cancel() this.$refs.ImportExcelDialog.cancel()
}, },
downloadExcelTemplate(arr){ downloadExcelTemplate(arr){

+ 72
- 53
src/views/business/comps/template/mixins/templateMixin.js View File

@ -1,10 +1,11 @@
import moment from 'moment' import moment from 'moment'
import { getLatestSn, getLatestSnArr } from '@/api/template'; import { getLatestSn, getLatestSnArr } from '@/api/template';
import { isValueEmpty } from '@/utils/index';
import { isValueEmpty, getStringWidth } from '@/utils/index';
import { isCommonUnit } from "@/utils/conTools"; import { isCommonUnit } from "@/utils/conTools";
import { sj_subpackage, sj_startConfiguration, sj_configurationCompleted } from '@/api/business/sj/sj'; import { sj_subpackage, sj_startConfiguration, sj_configurationCompleted } from '@/api/business/sj/sj';
import {convertConcentration} from "@/utils/conConverter";//浓度单位转换 import {convertConcentration} from "@/utils/conConverter";//浓度单位转换
import {volumeConverter} from "@/utils/volConverter";//体积单位转换 import {volumeConverter} from "@/utils/volConverter";//体积单位转换
import * as XLSX from 'xlsx'
export default { export default {
dicts: [ dicts: [
'business_pztj', 'business_pztj',
@ -33,6 +34,8 @@ export default {
'business_lba_jg', // LBA006-结果 'business_lba_jg', // LBA006-结果
'business_cftj', // 存放条件 'business_cftj', // 存放条件
'business_yplx', // 样品类型 'business_yplx', // 样品类型
'business_sydd', // 毒理-Ames实验地点
'business_dl_ameswrqk', // 毒理-Ames污染情况
], ],
props: { props: {
templateData: { templateData: {
@ -62,12 +65,28 @@ export default {
if (v.resource) { if (v.resource) {
//type 类型:1:试剂;3:给药制剂;5:麻精药;7:供试品 //type 类型:1:试剂;3:给药制剂;5:麻精药;7:供试品
//试验试剂信息 试剂 //试验试剂信息 试剂
this.resource = _.filter(JSON.parse(v.resource), function (o) {
// this.resource = _.filter(JSON.parse(v.resource), function (o) {
// return o.type == 1 || o.elnType == 1
// })
// //试验物资信息 供试品、给药制剂、麻精药
// this.resourceWz = _.filter(JSON.parse(v.resource), function (o) {
// return o.type == 3 || o.type == 5 || o.type == 7 || o.elnType == 3|| o.elnType == 5 || o.elnType == 7
// })
//试验试剂信息
this.resourceSj = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 1 || o.elnType == 1 return o.type == 1 || o.elnType == 1
}) })
//试验物资信息 供试品、给药制剂、麻精药
this.resourceWz = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 3 || o.type == 5 || o.type == 7 || o.elnType == 3|| o.elnType == 5 || o.elnType == 7
//供试品信息
this.resourceGsp = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 7 || o.elnType == 7
})
//给药制剂信息
this.resourceGyzj = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 3 || o.elnType == 3
})
//麻精药信息
this.resourceMjy = _.filter(JSON.parse(v.resource), function (o) {
return o.type == 5 || o.elnType == 5
}) })
} }
if (v.yqResource) { if (v.yqResource) {
@ -133,14 +152,51 @@ export default {
formData: {}, formData: {},
templateDetail: {}, templateDetail: {},
product: null,//产物:1:试剂;3:给药制剂;5:麻精药 product: null,//产物:1:试剂;3:给药制剂;5:麻精药
resource: [], //试验试剂信息
resourceWz: [], //物资信息
resource: [], //试验试剂信息--弃用
resourceWz: [], //物资信息--弃用
resourceSj: [],//试验试剂信息
resourceGsp: [],//供试品信息
resourceGyzj: [],//给药制剂信息
resourceMjy: [],//麻精药信息
yqResource: [], //仪器信息 yqResource: [], //仪器信息
jcbList: [], //检测板信息 jcbList: [], //检测板信息
resourceTmp: [],//试验试剂信息提交用 resourceTmp: [],//试验试剂信息提交用
yqResourceTmp: [], //仪器信息提交用 yqResourceTmp: [], //仪器信息提交用
jcbListTmp: [], //检测板信息提交用 jcbListTmp: [], //检测板信息提交用
sjColumns: [
{ label: 'template.common.reagentName', prop: "mc" },//名称
{ label: 'template.common.reagentCode', prop: "bh" },//编号
{ label: 'template.common.reagentNo', prop: "ph" },//批号 试剂,供试品才有
{ label: 'template.common.concentration', prop: "ndz" },//浓度
{ label: 'template.common.source', prop: "ly" },//来源
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//失效日期
],
gspColumns: [
{ label: 'template.common.wzName', prop: "mc" },//名称
{ label: 'template.common.wzCode', prop: "bh" },//编号
{ label: 'template.common.reagentNo', prop: "ph" },//批号 试剂,供试品才有
{ label: 'template.common.wzSource', prop: "ly" },//来源
{ label: 'template.common.wzConcentration', prop: "ndz" },//浓度
{ label: 'template.common.wzExpireDate', prop: "sxrq" },//失效日期
],
gyzjColumns: [
{ label: 'template.common.wzName', prop: "mc" },//名称
{ label: 'template.common.wzCode', prop: "bh" },//编号
{ label: 'template.common.wzSource', prop: "ly" },//来源
{ label: 'template.common.wzConcentration', prop: "ndz" },//浓度
{ label: 'template.common.wzExpireDate', prop: "sxrq" },//失效日期
],
mjyColumns: [
{ label: 'template.common.wzName', prop: "mc" },//名称
{ label: 'template.common.wzCode', prop: "bh" },//编号
{ label: 'template.common.wzSource', prop: "ly" },//来源
{ label: 'template.common.wzConcentration', prop: "ndz" },//浓度
{ label: 'template.common.wzExpireDate', prop: "sxrq" },//失效日期
],
//弃用
sysjColumns: [ sysjColumns: [
{ label: 'template.common.reagentName', prop: "mc" },//名称 { label: 'template.common.reagentName', prop: "mc" },//名称
{ label: 'template.common.reagentCode', prop: "bh" },//编号 { label: 'template.common.reagentCode', prop: "bh" },//编号
@ -149,6 +205,7 @@ export default {
{ label: 'template.common.source', prop: "ly" },//来源 { label: 'template.common.source', prop: "ly" },//来源
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//失效日期 { label: 'template.common.reagentExpireDate', prop: "sxrq" },//失效日期
], ],
//弃用
sywzColumns: [ sywzColumns: [
{ label: 'template.common.wzName', prop: "mc" },//名称 { label: 'template.common.wzName', prop: "mc" },//名称
{ label: 'template.common.wzCode', prop: "bh" },//编号 { label: 'template.common.wzCode', prop: "bh" },//编号
@ -548,54 +605,16 @@ export default {
} }
}, },
// 导出excel模板 // 导出excel模板
exportExcel(rows, title) {
exportExcel(headerArray, title = '导出模板') {
this.$modal.loading() this.$modal.loading()
// 生成表头
let tableHtml = '<table border="1" class="html-tabel">';
tableHtml += '<tr style="background:#eee;">';
rows.forEach(item => {
tableHtml += '<th style="text-align: center;">' + item + '</th>';
});
tableHtml += '</tr></table>'; // 正确闭合
// Worksheet 名称
const worksheet = title ? title : '导入模板';
// 完整的 HTML 模板(包含编码声明和 Excel 兼容命名空间)
const exportTemplate = `<!DOCTYPE html>
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<!--[if gte mso 9]>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions>
<x:DisplayGridlines/>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
<![endif]-->
</head>
<body>
${tableHtml}
</body>
</html>`;
// 使用 Blob 生成文件(指定 MIME 类型为 application/vnd.ms-excel)
const blob = new Blob([exportTemplate], { type: 'application/vnd.ms-excel;charset=utf-8' });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = worksheet + '.xls';
link.click();
URL.revokeObjectURL(link.href); // 释放内存
const ws = XLSX.utils.aoa_to_sheet([headerArray]);
const colWidths = headerArray.map(cell => getStringWidth(cell) + 2);
ws['!cols'] = colWidths.map(width => ({ wch: width }));
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
XLSX.writeFile(wb, `${title}.xlsx`);
this.$modal.closeLoading() this.$modal.closeLoading()
}, },
} }
} }

+ 50
- 10
src/views/business/form/nonTrial/comp/syffList.vue View File

@ -40,7 +40,7 @@
</div> </div>
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box">
<el-row class="add-box" v-ifan class="s">="searchForm.studyStatus < 5">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{ <el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{
$t('page.business.study.studyMethod.scff') }}</el-button> $t('page.business.study.studyMethod.scff') }}</el-button>
@ -51,20 +51,30 @@
<el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" /> <el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" />
<el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" /> <el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" />
<el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" /> <el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" />
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center" width="100">
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span> <span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span>
<span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span> <span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200">
<el-table-column :label="$t('page.business.study.studyMethod.sfgb')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === 1">{{ $t('page.business.study.studyMethod.s') }}</span>
<span v-if="scope.row.status === 10">{{ $t('page.business.study.studyMethod.f') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right">
<template slot-scope="scope" v-if="searchForm.studyStatus < 5">
<!-- 阅读 --> <!-- 阅读 -->
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{ <el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{
$t('page.business.study.studyMethod.yuedu') }}</el-button> $t('page.business.study.studyMethod.yuedu') }}</el-button>
<!-- 导出 --> <!-- 导出 -->
<el-button type="text" @click="showExport(scope.row)" v-hasPermi="['business:studyMethod:download']">{{ <el-button type="text" @click="showExport(scope.row)" v-hasPermi="['business:studyMethod:download']">{{
$t('page.business.study.studyMethod.daochu') }}</el-button> $t('page.business.study.studyMethod.daochu') }}</el-button>
<!-- 关闭 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.study.studyMethod.gb')"
v-if="scope.row.userId == id && scope.row.status == 10">{{
$t('page.business.study.studyMethod.gb') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -76,15 +86,18 @@
<!-- 新增 --> <!-- 新增 -->
<Xz key="Xz" ref="Xz" @callback="search" /> <Xz key="Xz" ref="Xz" @callback="search" />
<!-- 详情 --> <!-- 详情 -->
<Xq key="Xq" ref="Xq" v-show="showDetail" @close="xqClose" />
<Xq key="Xq" ref="Xq" v-show="showDetail" @close="xqClose" />
<!-- 签名 -->
<Sign ref="refSign" @callback="doSign" />
</div> </div>
</template> </template>
<script> <script>
import { studyMethod_list } from '@/api/business/study/studyMethod'
import { studyMethod_list, studyMethod_close } from '@/api/business/study/studyMethod'
import Xz from "./syff/Xz"; import Xz from "./syff/Xz";
import Xq from "./syff/Xq"; import Xq from "./syff/Xq";
import Sign from "@/views/business/comps/common/sign";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from "moment"; import moment from "moment";
export default { export default {
@ -108,6 +121,7 @@ export default {
this.searchForm.studySn = newVal.sn this.searchForm.studySn = newVal.sn
this.searchForm.studyMc = newVal.name this.searchForm.studyMc = newVal.name
this.searchForm.studyId = newVal.id this.searchForm.studyId = newVal.id
this.searchForm.studyStatus = newVal.status
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
this.search() this.search()
@ -116,7 +130,7 @@ export default {
deep: true deep: true
} }
}, },
components: { Xz, Xq },
components: { Xz, Xq, Sign },
data() { data() {
return { return {
showDetail: false, showDetail: false,
@ -134,6 +148,9 @@ export default {
startDate: '', startDate: '',
endDate: '' endDate: ''
}, },
form: {
id: null,
},
loading: false, loading: false,
total: 0, total: 0,
list: [], list: [],
@ -142,7 +159,20 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
handleSign(row, qmyy) {
this.form.id = row.id
let title = this.$t(qmyy)
this.$refs.refSign.show(title, title, false, false, true, false)
},
doSign(val) {
let params = _.merge({}, this.form, val)
this.$modal.loading()
studyMethod_close(params).then(res => {
this.getList()
}).finally(() => {
this.$modal.closeLoading()
})
},
search() { search() {
this.searchForm.pageNum = 1 this.searchForm.pageNum = 1
this.getList() this.getList()
@ -170,9 +200,19 @@ export default {
this.$refs.Xz.show(this.study); this.$refs.Xz.show(this.study);
}, },
detail(row) { detail(row) {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
//
if (row.status == 1) {
this.$modal.confirm(this.$t('page.business.study.studyMethod.gbts')).then(() => {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
}).catch(() => { });
} else {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
}
}, },
showExport(row) { showExport(row) {
this.showDetail = true this.showDetail = true

+ 2
- 1
src/views/business/resource/gsp/comps/gsp/Xq.vue View File

@ -135,6 +135,7 @@ export default {
components: { JcgjList, }, components: { JcgjList, },
data() { data() {
return { return {
appTitle: process.env.VUE_APP_TITLE,
form: {}, form: {},
tzList: [], tzList: [],
totalTz: 0, totalTz: 0,
@ -159,7 +160,7 @@ export default {
methods: { methods: {
exportPDF() { exportPDF() {
this.$modal.loading() this.$modal.loading()
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0] }).then(response => {
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0],version:this.appTitle }).then(response => {
window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg) window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg)
this.saveSimpleLog({name:this.form.bh,nameEn:this.form.bh,jcmc:'供试品导出',jcmcEn:'Test Item Export'}) this.saveSimpleLog({name:this.form.bh,nameEn:this.form.bh,jcmc:'供试品导出',jcmcEn:'Test Item Export'})
this.$modal.closeLoading() this.$modal.closeLoading()

+ 2
- 1
src/views/business/resource/gyzj/comps/gyzj/Xq.vue View File

@ -162,6 +162,7 @@ export default {
data() { data() {
return { return {
form: {}, form: {},
appTitle: process.env.VUE_APP_TITLE,
tzList: [], tzList: [],
totalTz: 0, totalTz: 0,
loadingTz: true, loadingTz: true,
@ -185,7 +186,7 @@ export default {
methods: { methods: {
exportExcel() { exportExcel() {
this.$modal.loading() this.$modal.loading()
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0] }).then(response => {
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0],version:this.appTitle }).then(response => {
window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg) window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg)
this.$modal.closeLoading() this.$modal.closeLoading()
}).finally(() => { }).finally(() => {

+ 2
- 1
src/views/business/resource/mjy/comps/mjy/Xq.vue View File

@ -160,6 +160,7 @@ export default {
data() { data() {
return { return {
form: {}, form: {},
appTitle: process.env.VUE_APP_TITLE,
tzList: [], tzList: [],
totalTz: 0, totalTz: 0,
loadingTz: true, loadingTz: true,
@ -183,7 +184,7 @@ export default {
methods: { methods: {
exportExcel() { exportExcel() {
this.$modal.loading() this.$modal.loading()
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0] }).then(response => {
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0],version:this.appTitle }).then(response => {
window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg) window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg)
this.$modal.closeLoading() this.$modal.closeLoading()
}).finally(() => { }).finally(() => {

+ 12
- 3
src/views/business/resource/sj/comps/Xq.vue View File

@ -9,6 +9,7 @@
</div> </div>
<div class="right-top"> <div class="right-top">
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> <el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
<el-button @click="exportPDF()">{{ $t('form.export') }}</el-button>
</div> </div>
</div> </div>
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ $t('page.business.resource.sj.sjxq') <div class="detail-title"><img src="@/assets/images/detail-title.png">{{ $t('page.business.resource.sj.sjxq')
@ -157,7 +158,7 @@
</template> </template>
<script> <script>
import { sj_info, tzList, jcgjList } from "@/api/business/sj/sj"
import { sj_info, tzList, jcgjList, exportDetail } from "@/api/business/sj/sj"
import JcgjList from "@/views/business/comps/common/JcgjList"; import JcgjList from "@/views/business/comps/common/JcgjList";
export default { export default {
@ -187,8 +188,16 @@ export default {
created() { created() {
}, },
methods: { methods: {
exportExcel() {
alert('todo')
exportPDF() {
this.$modal.loading()
exportDetail({ id: this.form.id,lang:this.$store.getters.language.split("_")[0],version:this.appTitle }).then(response => {
window.open(process.env.VUE_APP_FILE_DOMAIN +response.msg)
this.saveSimpleLog({name:this.form.bh,nameEn:this.form.bh,jcmc:'试剂导出',jcmcEn:'Reagent Export'})
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
}, },
jcgjListHandleQuery(val) { jcgjListHandleQuery(val) {
this.$modal.loading() this.$modal.loading()

+ 10
- 7
src/views/business/study/comp/syffList.vue View File

@ -40,7 +40,7 @@
</div> </div>
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box">
<el-row class="add-box" v-ifan class="s">="searchForm.studyStatus < 5">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{ <el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{
$t('page.business.study.studyMethod.scff') }}</el-button> $t('page.business.study.studyMethod.scff') }}</el-button>
@ -51,20 +51,20 @@
<el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" /> <el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" />
<el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" /> <el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" />
<el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" /> <el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" />
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center" width="100">
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span> <span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span>
<span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span> <span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.study.studyMethod.sfgb')" prop="status" align="center" width="100">
<el-table-column :label="$t('page.business.study.studyMethod.sfgb')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === 1">{{ $t('page.business.study.studyMethod.s') }}</span> <span v-if="scope.row.status === 1">{{ $t('page.business.study.studyMethod.s') }}</span>
<span v-if="scope.row.status === 10">{{ $t('page.business.study.studyMethod.f') }}</span> <span v-if="scope.row.status === 10">{{ $t('page.business.study.studyMethod.f') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200">
<template slot-scope="scope">
<el-table-column :label="$t('form.operate')" align="left" fixed="right">
<template slot-scope="scope" v-ifan class="s">="searchForm.studyStatus < 5">
<!-- 阅读 --> <!-- 阅读 -->
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{ <el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{
$t('page.business.study.studyMethod.yuedu') }}</el-button> $t('page.business.study.studyMethod.yuedu') }}</el-button>
@ -121,6 +121,7 @@ export default {
this.searchForm.studySn = newVal.sn this.searchForm.studySn = newVal.sn
this.searchForm.studyMc = newVal.name this.searchForm.studyMc = newVal.name
this.searchForm.studyId = newVal.id this.searchForm.studyId = newVal.id
this.searchForm.studyStatus = newVal.status
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
this.search() this.search()
@ -201,8 +202,10 @@ export default {
detail(row) { detail(row) {
// //
if (row.status == 1) { if (row.status == 1) {
this.$modal.confirm('该方法已关闭,无需阅读!').then(() => {
this.$modal.confirm(this.$t('page.business.study.studyMethod.gbts')).then(() => {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
}).catch(() => { }); }).catch(() => { });
} else { } else {
this.showDetail = true this.showDetail = true

+ 3
- 2
src/views/business/study/comp/syjList.vue View File

@ -42,7 +42,7 @@
</div> </div>
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box">
<el-row class="add-box" v-if="searchForm.studyStatus < 5">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyRoom:add']">{{ <el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyRoom:add']">{{
$t('page.business.study.studyRoom.xzqy') }}</el-button> $t('page.business.study.studyRoom.xzqy') }}</el-button>
@ -69,7 +69,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200"> <el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200">
<template slot-scope="scope">
<template slot-scope="scope" v-if="searchForm.studyStatus < 5">
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyRoom:ljjl']">{{ <el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyRoom:ljjl']">{{
$t('page.business.study.studyRoom.xq') }}</el-button> $t('page.business.study.studyRoom.xq') }}</el-button>
<!-- 笼具记录 --> <!-- 笼具记录 -->
@ -136,6 +136,7 @@ export default {
this.searchForm.studySn = newVal.sn this.searchForm.studySn = newVal.sn
this.searchForm.studyMc = newVal.name this.searchForm.studyMc = newVal.name
this.searchForm.studyId = newVal.id this.searchForm.studyId = newVal.id
this.searchForm.studyStatus = newVal.status
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
this.search() this.search()

+ 1
- 1
src/views/business/study/comp/wzlb/bacteriaList.vue View File

@ -55,7 +55,7 @@
<el-table-column :label="$t('form.operate')" fixed="right" align="center" <el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px"> class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<template slot-scope="scope" v-ifan class="s">="queryParams.studyStatus < 5">
<!-- 详情 --> <!-- 详情 -->
<el-button type="text" @click="handleCz(scope.row)" >{{ <el-button type="text" @click="handleCz(scope.row)" >{{
$t('page.business.study.cell.cz') }}</el-button> $t('page.business.study.cell.cz') }}</el-button>

+ 2
- 2
src/views/business/study/comp/wzlb/cellList.vue View File

@ -55,9 +55,9 @@
<el-table-column :label="$t('form.operate')" fixed="right" align="center" <el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px"> class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<template slot-scope="scope" v-ifan class="s">="queryParams.studyStatus < 5">
<!-- 详情 --> <!-- 详情 -->
<el-button type="text" @click="handleCz(scope.row)" >{{
<el-button type="text" @click="handleCz(scope.row)" >{{
$t('page.business.study.cell.cz') }}</el-button> $t('page.business.study.cell.cz') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>

+ 1
- 1
src/views/business/study/comp/wzlb/gspList.vue View File

@ -76,7 +76,7 @@
<el-button type="text" @click="handleXq(scope.row)" <el-button type="text" @click="handleXq(scope.row)"
v-hasPermi="['business:studyMjy:xq', 'business:nonTrialMjy:xq', 'business:drugMjy:xq']">{{ v-hasPermi="['business:studyMjy:xq', 'business:nonTrialMjy:xq', 'business:drugMjy:xq']">{{
$t('page.business.resource.gsp.detail') }}</el-button> $t('page.business.resource.gsp.detail') }}</el-button>
<template v-if="queryParams.studyStatus != 5">
<template v-if="queryParams.studyStatus < 5">
<template v-if="scope.row.syghzt == 1"> <template v-if="scope.row.syghzt == 1">
<!-- 处置 --> <!-- 处置 -->
<el-button type="text" @click="handleCz(scope.row)" <el-button type="text" @click="handleCz(scope.row)"

+ 1
- 1
src/views/business/study/comp/wzlb/gyzjList.vue View File

@ -85,7 +85,7 @@
<el-button type="text" @click="handleXq(scope.row)" <el-button type="text" @click="handleXq(scope.row)"
v-hasPermi="['business:studyGyzj:xq', 'business:nonTrialGyzj:xq', 'business:drugGyzj:xq']">{{ v-hasPermi="['business:studyGyzj:xq', 'business:nonTrialGyzj:xq', 'business:drugGyzj:xq']">{{
$t('page.business.resource.gyzj.detail') }}</el-button> $t('page.business.resource.gyzj.detail') }}</el-button>
<template v-if="queryParams.studyStatus != 5">
<template v-if="queryParams.studyStatus < 5">
<template v-if="scope.row.zjzt == 3 && scope.row.cczt == 1"> <template v-if="scope.row.zjzt == 3 && scope.row.cczt == 1">
<template v-if="scope.row.ghzt == 1"> <template v-if="scope.row.ghzt == 1">
<!-- 归还 --> <!-- 归还 -->

+ 1
- 1
src/views/business/study/comp/wzlb/mjyList.vue View File

@ -86,7 +86,7 @@
<el-button type="text" @click="handleXq(scope.row)" <el-button type="text" @click="handleXq(scope.row)"
v-hasPermi="['business:studyMjy:xq', 'business:nonTrialMjy:xq', 'business:drugMjy:xq']">{{ v-hasPermi="['business:studyMjy:xq', 'business:nonTrialMjy:xq', 'business:drugMjy:xq']">{{
$t('page.business.resource.mjy.detail') }}</el-button> $t('page.business.resource.mjy.detail') }}</el-button>
<template v-if="queryParams.studyStatus != 5">
<template v-if="queryParams.studyStatus < 5">
<template v-if="scope.row.zjzt == 3 && scope.row.cczt == 1"> <template v-if="scope.row.zjzt == 3 && scope.row.cczt == 1">
<!-- 处置药剂 --> <!-- 处置药剂 -->
<el-button type="text" @click="handleCzyj(scope.row)" <el-button type="text" @click="handleCzyj(scope.row)"

+ 1
- 1
src/views/business/study/comp/wzlb/sjList.vue View File

@ -74,7 +74,7 @@
<el-button type="text" @click="handleXq(scope.row)" v-hasPermi="['business:resource:sj:xq']">{{ <el-button type="text" @click="handleXq(scope.row)" v-hasPermi="['business:resource:sj:xq']">{{
$t('page.business.resource.sj.detail') }}</el-button> $t('page.business.resource.sj.detail') }}</el-button>
</template> </template>
<template v-if="queryParams.studyStatus != 5">
<template v-if="queryParams.studyStatus < 5">
<!-- 处置 --> <!-- 处置 -->
<template v-if="scope.row.zjzt == 1"> <template v-if="scope.row.zjzt == 1">
<el-button type="text" @click="handleCz(scope.row)" v-hasPermi="['business:resource:sj:cz']">{{ <el-button type="text" @click="handleCz(scope.row)" v-hasPermi="['business:resource:sj:cz']">{{

+ 1
- 1
src/views/business/study/comp/ytbd/Bj.vue View File

@ -228,7 +228,7 @@ export default {
this.$modal.loading() this.$modal.loading()
studyFormPre_bcOnly(this.form).then(response => { studyFormPre_bcOnly(this.form).then(response => {
this.form = response.data this.form = response.data
this.templateData.bdmc = this.form.bdmc
this.templateData = deepClone(this.form)
this.showIndex = 2 this.showIndex = 2
this.$modal.closeLoading() this.$modal.closeLoading()
}).finally(() => { }).finally(() => {

+ 2
- 2
vue.config.js View File

@ -34,8 +34,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`,
// target: `http://39.99.251.173:8080`,
// target: `http://localhost:8080`,
target: `http://39.99.251.173:8080`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save