luojie 2 months ago
parent
commit
d9e252731c
17 changed files with 194 additions and 92 deletions
  1. +45
    -23
      src/views/business/comps/select/BusinessSelect.vue
  2. +7
    -3
      src/views/business/comps/select/SelectTemplate.vue
  3. +2
    -1
      src/views/business/form/drug/comp/sqbdList.vue
  4. +3
    -0
      src/views/business/form/drug/comp/tbbdList.vue
  5. +1
    -0
      src/views/business/form/drug/comp/ytbdList.vue
  6. +7
    -3
      src/views/business/form/nonTrial/comp/tbbdList.vue
  7. +3
    -1
      src/views/business/form/nonTrial/comp/ytbdList.vue
  8. +4
    -2
      src/views/business/resource/sj/comps/Bj.vue
  9. +6
    -2
      src/views/business/study/comp/jhbd/Bj.vue
  10. +3
    -2
      src/views/business/study/comp/jhbdList.vue
  11. +6
    -2
      src/views/business/study/comp/sqbd/Bj.vue
  12. +4
    -2
      src/views/business/study/comp/tbbd/Bj.vue
  13. +5
    -1
      src/views/business/study/comp/tbbdList.vue
  14. +4
    -2
      src/views/business/study/comp/ytbd/Bj.vue
  15. +3
    -1
      src/views/business/study/comp/ytbdList.vue
  16. +89
    -45
      src/views/business/template/list.vue
  17. +2
    -2
      vue.config.js

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

@ -8,25 +8,25 @@
<!-- 处置方式business_czfs --> <!-- 处置方式business_czfs -->
<template> <template>
<div> <div>
<el-select :style="showMax?'width:100%':''" v-model="selected" :placeholder="$t('form.placeholderSelect')" :disabled="readonly" :multiple="multiple" @change="handleChange" :filterable="filterable">
<el-option v-for="item in list" :key="item.dictCode" :label="item.dictLabel" :value="item.dictLabel" />
<el-select :style="showMax ? 'width:100%' : ''" v-model="selected" :placeholder="$t('form.placeholderSelect')"
:disabled="readonly" :multiple="multiple" @change="handleChange" :filterable="filterable">
<el-option v-for="item in list" :key="item.dictCode" :label="item.dictLabel" :value="item.dictLabel" />
</el-select> </el-select>
</div> </div>
</template> </template>
<script> <script>
import { listData } from "@/api/system/dict/data" import { listData } from "@/api/system/dict/data"
export default { export default {
name: "BusinessSelect", name: "BusinessSelect",
components: {}, components: {},
props: { props: {
dictType: { dictType: {
type: [Number, String , Array],
type: [Number, String, Array],
default: '' default: ''
}, },
value: { value: {
type: [Number, String , Array],
type: [Number, String, Array],
default: '', default: '',
}, },
readonly: { readonly: {
@ -54,18 +54,18 @@ export default {
value: { value: {
immediate: true, immediate: true,
handler(v) { handler(v) {
if(!this.multiple){
if (!this.multiple) {
this.selected = v ? v : '' this.selected = v ? v : ''
}else{
if(v){
} else {
if (v) {
//, //,
let arr = v.split(',') let arr = v.split(',')
let s = [] let s = []
_.forEach(arr,a=>{
_.forEach(arr, a => {
s.push(a) s.push(a)
}) })
this.selected = s this.selected = s
}else{
} else {
this.selected = [] this.selected = []
} }
} }
@ -90,23 +90,45 @@ export default {
methods: { methods: {
getList() { getList() {
this.list = [] this.list = []
listData(this.queryParams).then(response => {
this.list = response.rows
})
if (this.dictType === 'business_ccwz') {
listData(this.queryParams).then(response => {
this.list = response.rows
this.list.forEach(item => {
item.dictLabel = item.bh
item.dictCode = item.id
})
})
} else {
listData(this.queryParams).then(response => {
this.list = response.rows
})
}
}, },
handleChange(val) { handleChange(val) {
this.$emit('input', this.multiple ? (val && val.length>0 ? val.join(','): ''):(val || ''))
//,
let _index = _.findIndex(this.list, function (a) {
return a.dictLabel == val
})
console.log(_index)
if (_index > -1) {
this.$emit('change', this.list[_index])
console.log(val)
if (this.dictType === 'business_ccwz') {
this.$emit('input', this.multiple ? (val && val.length > 0 ? val.join(',') : '') : (val || ''))
//,
let _index = _.findIndex(this.list, function (a) {
return a.dictLabel == val
})
if (_index > -1) {
this.$emit('change', this.list[_index])
} else {
this.$emit('change', null)
}
} else { } else {
this.$emit('change', null)
this.$emit('input', this.multiple ? (val && val.length > 0 ? val.join(',') : '') : (val || ''))
//,
let _index = _.findIndex(this.list, function (a) {
return a.dictLabel == val
})
if (_index > -1) {
this.$emit('change', this.list[_index])
} else {
this.$emit('change', null)
}
} }
}, },
} }
}; };

+ 7
- 3
src/views/business/comps/select/SelectTemplate.vue View File

@ -27,11 +27,15 @@ export default {
}, },
needPre: { needPre: {
type: Number, type: Number,
default: 0
default: 1
}, },
studyType: { studyType: {
type: Number, type: Number,
default: 20
default: null
},
studyFormType: {
type: Number,
default: null
}, },
}, },
watch: { watch: {
@ -61,7 +65,7 @@ export default {
methods: { methods: {
showSelectTemplate(){ showSelectTemplate(){
if(!this.disabled){ if(!this.disabled){
this.$refs.selectTemplateDialog.show({needPre:this.needPre,studyType:this.studyType})
this.$refs.selectTemplateDialog.show({needPre:this.needPre,studyType:this.studyType,studyFormType:this.studyFormType})
} }
}, },
handleChange(obj) { handleChange(obj) {

+ 2
- 1
src/views/business/form/drug/comp/sqbdList.vue View File

@ -322,7 +322,8 @@ export default {
add() { add() {
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc, studyId: this.searchForm.studyId })
this.$refs.Bj.edit({
studyFormType:15,studyType: 10,studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc, studyId: this.searchForm.studyId })
}, },
edit(row) { edit(row) {
this.showEdit = true this.showEdit = true

+ 3
- 0
src/views/business/form/drug/comp/tbbdList.vue View File

@ -331,6 +331,7 @@ export default {
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 10, studyType: 10,
studyFormType:5,
formId: null formId: null
})) }))
this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/drug/formFillBj/' + params) this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/drug/formFillBj/' + params)
@ -342,6 +343,8 @@ export default {
let params = caesarCipher(JSON.stringify({ let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 10,
studyFormType:5,
formId: row.id formId: row.id
})) }))
this.$tab.openPage(row.bdmc, '/drug/formFillBj/' + params) this.$tab.openPage(row.bdmc, '/drug/formFillBj/' + params)

+ 1
- 0
src/views/business/form/drug/comp/ytbdList.vue View File

@ -403,6 +403,7 @@ export default {
studyMc: this.searchForm.studyMc, studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 10, studyType: 10,
studyFormType:1,
permitForSecectUser: 'business:drugFormPre:sh' permitForSecectUser: 'business:drugFormPre:sh'
}) })
}, },

+ 7
- 3
src/views/business/form/nonTrial/comp/tbbdList.vue View File

@ -401,13 +401,15 @@ export default {
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId }) // this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId })
this.$modal.loading() this.$modal.loading()
studyMethod_getReadAllMethodStatus({ userId: this.id, studyId: this.searchForm.studyId }).then(response => {
studyMethod_getReadAllMethodStatus({
studyType: 5,userId: this.id, studyId: this.searchForm.studyId }).then(response => {
if (response.data.toUrl) { if (response.data.toUrl) {
this.toRead(response.data) this.toRead(response.data)
} else { } else {
let params = caesarCipher(JSON.stringify({ let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyFormType:5,
formId: null formId: null
})) }))
this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/nonTrial/formFillBj/' + params) this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/nonTrial/formFillBj/' + params)
@ -421,14 +423,16 @@ export default {
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit(row) // this.$refs.Bj.edit(row)
this.$modal.loading() this.$modal.loading()
studyMethod_getReadAllMethodStatus({ userId: this.id, studyId: this.searchForm.studyId }).then(response => {
studyMethod_getReadAllMethodStatus({
studyType: 5, userId: this.id, studyId: this.searchForm.studyId }).then(response => {
if (response.data.toUrl) { if (response.data.toUrl) {
this.toRead(response.data) this.toRead(response.data)
} else { } else {
let params = caesarCipher(JSON.stringify({ let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
formId: row.id
formId: row.id,
studyFormType:5,
})) }))
this.$tab.openPage(row.bdmc, '/nonTrial/formFillBj/' + params) this.$tab.openPage(row.bdmc, '/nonTrial/formFillBj/' + params)
} }

+ 3
- 1
src/views/business/form/nonTrial/comp/ytbdList.vue View File

@ -439,12 +439,14 @@ export default {
studySn: this.searchForm.studySn, studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc, studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 5,
studyFormType:1,
permitForSecectUser: 'business:nonTrialFormPre:sh' permitForSecectUser: 'business:nonTrialFormPre:sh'
}) })
}, },
edit(row) { edit(row) {
this.$modal.loading() this.$modal.loading()
studyMethod_getReadAllMethodStatus({ userId: this.id, studyId: this.searchForm.studyId }).then(response => {
studyMethod_getReadAllMethodStatus({ studyType: 5,userId: this.id, studyId: this.searchForm.studyId }).then(response => {
if (response.data.toUrl) { if (response.data.toUrl) {
this.toRead(response.data) this.toRead(response.data)
} else { } else {

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

@ -49,7 +49,7 @@
<el-col :span="12"> <el-col :span="12">
<!-- 存储位置 --> <!-- 存储位置 -->
<el-form-item :label="$t('page.business.resource.sj.ccwz')" prop="ccwz"> <el-form-item :label="$t('page.business.resource.sj.ccwz')" prop="ccwz">
<BusinessSelect dictType="business_ccwz" v-model="form.ccwz" />
<BusinessSelect dictType="business_ccwz" v-model="form.ccwz" @change="onChangeCcwz"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -149,7 +149,6 @@ export default {
this.reset() this.reset()
sj_info({id: row.id}).then(response => { sj_info({id: row.id}).then(response => {
this.form = response.data this.form = response.data
console.log(this.form)
this.open = true this.open = true
}) })
@ -163,6 +162,9 @@ export default {
}) })
} }
}) })
},
onChangeCcwz(val) {
console.log(val)
} }
} }
} }

+ 6
- 2
src/views/business/study/comp/jhbd/Bj.vue View File

@ -41,7 +41,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId"> <el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="true" :needPre="1" :name="form.templateMc"
<SelectTemplate v-model="form.templateId" :studyType="studyType" :studyFormType="studyFormType" :needPre="1" :name="form.templateMc"
@change="selectTemplateChange" /> @change="selectTemplateChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -179,7 +179,9 @@ export default {
}], }],
}, },
templateData: {}
templateData: {},
studyType: null,
studyFormType:null
} }
}, },
computed: { computed: {
@ -265,6 +267,8 @@ export default {
}, },
edit(row) { edit(row) {
this.reset() this.reset()
this.studyType = row.studyType||null
this.studyFormType = row.studyFormType||null
this.form.qmyy = this.$t('page.business.study.studyFormPlan.cjjl') this.form.qmyy = this.$t('page.business.study.studyFormPlan.cjjl')
if (row && row.id) { if (row && row.id) {
this.showIndex = 2 this.showIndex = 2

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

@ -254,7 +254,8 @@ export default {
} else { } else {
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ studySn: this.searchForm.studySn, studyMc: this.searchForm.studyMc, studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId })
this.$refs.Bj.edit({
studyFormType:10, studyType: 1,studySn: this.searchForm.studySn, studyMc: this.searchForm.studyMc, studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId })
} }
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
@ -262,7 +263,7 @@ export default {
}, },
edit(row) { edit(row) {
this.$modal.loading() this.$modal.loading()
studyMethod_getReadAllMethodStatus({ userId: this.id, studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId }).then(response => {
studyMethod_getReadAllMethodStatus({ studyType: 1,userId: this.id, studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId }).then(response => {
if (response.data.toUrl) { if (response.data.toUrl) {
this.toRead(response.data) this.toRead(response.data)
} else { } else {

+ 6
- 2
src/views/business/study/comp/sqbd/Bj.vue View File

@ -41,7 +41,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId"> <el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="true" :name="form.templateMc"
<SelectTemplate v-model="form.templateId" :studyType="studyType" :studyFormType="studyFormType" :name="form.templateMc"
@change="selectTemplateChange" /> @change="selectTemplateChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -179,7 +179,9 @@ export default {
}], }],
}, },
templateData: {}
templateData: {},
studyType: null,
studyFormType:null
} }
}, },
computed: { computed: {
@ -268,6 +270,8 @@ export default {
}, },
edit(row) { edit(row) {
this.reset() this.reset()
this.studyType = row.studyType||null
this.studyFormType = row.studyFormType||null
if (row && row.id) { if (row && row.id) {
this.showIndex = 2 this.showIndex = 2
this.$modal.loading() this.$modal.loading()

+ 4
- 2
src/views/business/study/comp/tbbd/Bj.vue View File

@ -44,7 +44,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="bdmbTitle" prop="templateId"> <el-form-item :label="bdmbTitle" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" <SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''"
:name="form.templateMc" :studyType="studyType" @change="selectTemplateChange" :needPre="1" />
:name="form.templateMc" :studyType="studyType" :studyFormType="studyFormType" @change="selectTemplateChange" :needPre="1" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -459,7 +459,8 @@ export default {
}] }]
}, },
templateData: {}, templateData: {},
studyType: null
studyType: null,
studyFormType:null
} }
}, },
computed: { computed: {
@ -531,6 +532,7 @@ export default {
try { try {
params = JSON.parse(caesarDecipher(this.$route.params.key)) params = JSON.parse(caesarDecipher(this.$route.params.key))
this.studyType = params.studyType || null this.studyType = params.studyType || null
this.studyFormType = params.studyFormType || null
} catch (e) { } catch (e) {
console.log('参数错误') console.log('参数错误')
} }

+ 5
- 1
src/views/business/study/comp/tbbdList.vue View File

@ -413,6 +413,8 @@ export default {
let params = caesarCipher(JSON.stringify({ let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 1,
studyFormType:5,
id: null id: null
})) }))
this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/study/formFillBj/' + params) this.$tab.openPage(this.$t('page.business.study.studyFormFill.xzbd'), '/study/formFillBj/' + params)
@ -426,13 +428,15 @@ export default {
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit(row) // this.$refs.Bj.edit(row)
this.$modal.loading() this.$modal.loading()
studyMethod_getReadAllMethodStatus({ userId: this.id, studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId }).then(response => {
studyMethod_getReadAllMethodStatus({userId: this.id, studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId }).then(response => {
if (response.data.toUrl) { if (response.data.toUrl) {
this.toRead(response.data) this.toRead(response.data)
} else { } else {
let params = caesarCipher(JSON.stringify({ let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath, url: this.$route.fullPath,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 1,
studyFormType:5,
formId: row.id formId: row.id
})) }))
this.$tab.openPage(row.bdmc, '/study/formFillBj/' + params) this.$tab.openPage(row.bdmc, '/study/formFillBj/' + params)

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

@ -42,7 +42,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId"> <el-form-item :label="$t('page.business.form.bdmb')" prop="templateId">
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" :needPre="10" <SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" :needPre="10"
:name="form.templateMc" :studyType="studyType" @change="selectTemplateChange" />
:name="form.templateMc" :studyType="studyType" :studyFormType="studyFormType" @change="selectTemplateChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -186,7 +186,8 @@ export default {
}, },
templateData: {}, templateData: {},
studyType:null
studyType:null,
studyFormType:null,
} }
}, },
computed: { computed: {
@ -265,6 +266,7 @@ export default {
this.reset() this.reset()
this.permitForSecectUser = row.permitForSecectUser this.permitForSecectUser = row.permitForSecectUser
this.studyType = row.studyType||null this.studyType = row.studyType||null
this.studyFormType = row.studyFormType||null
if (row && row.id) { if (row && row.id) {
this.showIndex = 2 this.showIndex = 2
this.$modal.loading() this.$modal.loading()

+ 3
- 1
src/views/business/study/comp/ytbdList.vue View File

@ -346,6 +346,7 @@ export default {
studySn: this.searchForm.studySn, studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc, studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 1,
permitForSecectUser: 'business:studyFormPre:sh' permitForSecectUser: 'business:studyFormPre:sh'
}) })
}).finally(() => { }).finally(() => {
@ -438,6 +439,7 @@ export default {
studySn: this.searchForm.studySn, studySn: this.searchForm.studySn,
studyMc: this.searchForm.studyMc, studyMc: this.searchForm.studyMc,
studyId: this.searchForm.studyId, studyId: this.searchForm.studyId,
studyType: 1,
studySubjectId: this.searchForm.studySubjectId, studySubjectId: this.searchForm.studySubjectId,
permitForSecectUser: 'business:studyFormPre:sh' permitForSecectUser: 'business:studyFormPre:sh'
}) })
@ -450,7 +452,7 @@ export default {
} else { } else {
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit(_.merge({}, row, { permitForSecectUser: 'business:studyFormPre:sh' }))
this.$refs.Bj.edit(_.merge({}, row, { permitForSecectUser: 'business:studyFormPre:sh',studyType: 1 }))
} }
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()

+ 89
- 45
src/views/business/template/list.vue View File

@ -45,7 +45,7 @@
<span v-if="scope.row.needPre === 1"></span> <span v-if="scope.row.needPre === 1"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产物" prop="product" align="center" width="100">
<el-table-column label="产物" prop="product" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.product == 1">试剂</span> <span v-if="scope.row.product == 1">试剂</span>
<span v-if="scope.row.product == 3">给药制剂</span> <span v-if="scope.row.product == 3">给药制剂</span>
@ -62,7 +62,8 @@
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="100"> <el-table-column :label="$t('form.operate')" fixed="right" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">{{ $t('page.system.template.bj') }}</el-button> <el-button type="text" @click="edit(scope.row)">{{ $t('page.system.template.bj') }}</el-button>
<el-button type="text" @click="bdpz(scope.row)" v-hasPermi="['business:template:detail']">{{ $t('page.system.template.detail') }}</el-button>
<el-button type="text" @click="bdpz(scope.row)" v-hasPermi="['business:template:detail']">{{
$t('page.system.template.detail') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -70,8 +71,8 @@
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
@pagination="getList" /> @pagination="getList" />
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="infoDialog.title" :visible.sync="infoDialog.visible" width="800px"
append-to-body>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="infoDialog.title"
:visible.sync="infoDialog.visible" width="800px" append-to-body>
<el-form ref="infoDialogForm" :model="infoDialog.formData" :rules="infoDialog.rules" label-width="180px"> <el-form ref="infoDialogForm" :model="infoDialog.formData" :rules="infoDialog.rules" label-width="180px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -91,7 +92,8 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="状态:" prop="status"> <el-form-item label="状态:" prop="status">
<el-select v-model="infoDialog.formData.status" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-select v-model="infoDialog.formData.status" :placeholder="$t('form.placeholderSelect')"
style="width:100%">
<el-option label="启用" :value="10" /> <el-option label="启用" :value="10" />
<el-option label="禁用" :value="1" /> <el-option label="禁用" :value="1" />
</el-select> </el-select>
@ -99,7 +101,8 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="是否需要预填:" prop="needPre"> <el-form-item label="是否需要预填:" prop="needPre">
<el-select v-model="infoDialog.formData.needPre" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-select v-model="infoDialog.formData.needPre" :placeholder="$t('form.placeholderSelect')"
style="width:100%">
<el-option label="是" :value="10" /> <el-option label="是" :value="10" />
<el-option label="否" :value="1" /> <el-option label="否" :value="1" />
</el-select> </el-select>
@ -107,7 +110,8 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="产物:" prop="product"> <el-form-item label="产物:" prop="product">
<el-select v-model="infoDialog.formData.product" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-select v-model="infoDialog.formData.product" :placeholder="$t('form.placeholderSelect')"
style="width:100%">
<el-option label="试剂" :value="1" /> <el-option label="试剂" :value="1" />
<el-option label="给药制剂" :value="3" /> <el-option label="给药制剂" :value="3" />
<el-option label="麻精药" :value="5" /> <el-option label="麻精药" :value="5" />
@ -117,33 +121,47 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="填报是否显示观察按钮:" prop="showGc"> <el-form-item label="填报是否显示观察按钮:" prop="showGc">
<el-select v-model="infoDialog.formData.showGc" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-select v-model="infoDialog.formData.showGc" :placeholder="$t('form.placeholderSelect')"
style="width:100%">
<el-option label="否" :value="1" /> <el-option label="否" :value="1" />
<el-option label="是" :value="10" /> <el-option label="是" :value="10" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-col :span="24">
<el-form-item label="填报显示药剂存储按钮:" prop="showYjcc"> <el-form-item label="填报显示药剂存储按钮:" prop="showYjcc">
<el-select v-model="infoDialog.formData.showYjcc" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-select v-model="infoDialog.formData.showYjcc" :placeholder="$t('form.placeholderSelect')"
style="width:100%">
<el-option label="否" :value="1" /> <el-option label="否" :value="1" />
<el-option label="是" :value="10" /> <el-option label="是" :value="10" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-col :span="24">
<el-form-item label="所属试验类型:" prop="studyType"> <el-form-item label="所属试验类型:" prop="studyType">
<el-select v-model="infoDialog.formData.studyType" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-option label="试验" :value="1" />
<el-option label="非试验" :value="5" />
<el-option label="麻精药表单" :value="10" />
<el-option label="全部" :value="20" />
<el-select v-model="studyTypeArr" multiple @change="studyTypeChange"
:placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-option label="试验" value="1" />
<el-option label="非试验" value="5" />
<el-option label="麻精药表单" value="10" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-col :span="24">
<el-form-item label="所属表单类型:" prop="studyFormType">
<el-select v-model="studyFormTypeArr" multiple @change="studyFormTypeChange"
:placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-option label="预填表单" value="1" />
<el-option label="填报表单" value="5" />
<el-option label="配置计划表" value="10" />
<el-option label="领取申请单" value="15" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="pdf导出大小:" prop="pdfSize"> <el-form-item label="pdf导出大小:" prop="pdfSize">
<el-select v-model="infoDialog.formData.pdfSize" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-select v-model="infoDialog.formData.pdfSize" :placeholder="$t('form.placeholderSelect')"
style="width:100%">
<el-option label="a1" value="a1" /> <el-option label="a1" value="a1" />
<el-option label="a2" value="a2" /> <el-option label="a2" value="a2" />
<el-option label="a3" value="a3" /> <el-option label="a3" value="a3" />
@ -162,12 +180,13 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="步骤库:" prop="stepGroupIds"> <el-form-item label="步骤库:" prop="stepGroupIds">
<el-select multiple v-model="stepGroupIdArr" :placeholder="$t('form.placeholderSelect')" style="width:100%" @change="changeStepGroup">
<el-select multiple v-model="stepGroupIdArr" :placeholder="$t('form.placeholderSelect')"
style="width:100%" @change="changeStepGroup">
<el-option v-for="item in stepGroupList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in stepGroupList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -175,9 +194,9 @@
<el-button @click="infoDialog.visible = false"> </el-button> <el-button @click="infoDialog.visible = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="$t('page.system.template.bdpz')" :visible.sync="tableDialog.visible"
width="90%" append-to-body>
<TemplateTable ref = "templateTable" :sn="tableDialog.sn" v-if="tableDialog.visible" fillType="preFill" />
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="$t('page.system.template.bdpz')"
:visible.sync="tableDialog.visible" width="90%" append-to-body>
<TemplateTable ref="templateTable" :sn="tableDialog.sn" v-if="tableDialog.visible" fillType="preFill" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -192,7 +211,7 @@ const EmptyDialogData = {
name: '', name: '',
sn: '', sn: '',
deptId: '', deptId: '',
status:10,
status: 10,
needPre: 10, needPre: 10,
type: 10, type: 10,
@ -212,6 +231,8 @@ export default {
}, },
data() { data() {
return { return {
studyTypeArr: [],
studyFormTypeArr: [],
searchForm: { searchForm: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
@ -225,9 +246,9 @@ export default {
total: 0, total: 0,
list: [], list: [],
stepGroupList:[],
stepGroupIdArr:[],
stepGroupList: [],
stepGroupIdArr: [],
infoDialog: { infoDialog: {
title: '', title: '',
visible: false, visible: false,
@ -236,37 +257,40 @@ export default {
rules: { rules: {
showGc: [ showGc: [
{ required: true, message:'请选择', trigger: "blur" }
{ required: true, message: '请选择', trigger: "blur" }
], ],
sn: [ sn: [
{ required: true, message:'请输入', trigger: "blur" }
{ required: true, message: '请输入', trigger: "blur" }
], ],
name: [ name: [
{ required: true, message:'请输入', trigger: "blur" }
{ required: true, message: '请输入', trigger: "blur" }
], ],
deptId: [ deptId: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
status: [ status: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
product: [ product: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
needPre: [ needPre: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
type: [ type: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
pdfSize: [ pdfSize: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
showYjcc: [ showYjcc: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
], ],
studyType: [ studyType: [
{ required: true, message:'请选择', trigger: "change" }
{ required: true, message: '请选择', trigger: "change" }
],
studyFormType: [
{ required: true, message: '请选择', trigger: "change" }
], ],
}, },
}, },
@ -282,17 +306,17 @@ export default {
this.getGroupList() this.getGroupList()
}, },
methods: { methods: {
getGroupList(){
stepGroup_list({ pageNum: 1, pageSize:9999}).then(response => {
getGroupList() {
stepGroup_list({ pageNum: 1, pageSize: 9999 }).then(response => {
this.stepGroupList = response.rows; this.stepGroupList = response.rows;
}); });
}, },
bdpz(row) { bdpz(row) {
this.saveSimpleLog({name:row.name+'('+row.showSn+')',nameEn:row.name+'('+row.showSn+')',jcmc:'模板详情',jcmcEn:'Function Detail'})
this.saveSimpleLog({ name: row.name + '(' + row.showSn + ')', nameEn: row.name + '(' + row.showSn + ')', jcmc: '模板详情', jcmcEn: 'Function Detail' })
this.tableDialog.title = '表单配置' this.tableDialog.title = '表单配置'
this.tableDialog.sn=row.sn
this.tableDialog.visible=true
this.tableDialog.sn = row.sn
this.tableDialog.visible = true
}, },
getList() { getList() {
this.loading = true; this.loading = true;
@ -326,7 +350,13 @@ export default {
this.$modal.loading() this.$modal.loading()
template_info({ id: row.id }).then(({ data }) => { template_info({ id: row.id }).then(({ data }) => {
this.infoDialog.formData = data this.infoDialog.formData = data
this.stepGroupIdArr = this.infoDialog.formData.stepGroupIds ? _.map(this.infoDialog.formData.stepGroupIds.split(','),(o)=>{return parseInt(o)}): []
if (this.infoDialog.formData.studyType && this.infoDialog.formData.studyType != '') {
this.studyTypeArr = this.infoDialog.formData.studyType.split(',')
}
if (this.infoDialog.formData.studyFormType && this.infoDialog.formData.studyFormType != '') {
this.studyFormTypeArr = this.infoDialog.formData.studyFormType.split(',')
}
this.stepGroupIdArr = this.infoDialog.formData.stepGroupIds ? _.map(this.infoDialog.formData.stepGroupIds.split(','), (o) => { return parseInt(o) }) : []
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
@ -341,9 +371,23 @@ export default {
// this.$modal.closeLoading() // this.$modal.closeLoading()
// }) // })
}, },
changeStepGroup(val){
changeStepGroup(val) {
this.infoDialog.formData.stepGroupIds = val.join(',') this.infoDialog.formData.stepGroupIds = val.join(',')
}, },
studyTypeChange() {
if (this.studyTypeArr && this.studyTypeArr.length > 0) {
this.infoDialog.formData.studyType = this.studyTypeArr.join(',')
} else {
this.infoDialog.formData.studyType = ''
}
},
studyFormTypeChange() {
if (this.studyFormTypeArr && this.studyFormTypeArr.length > 0) {
this.infoDialog.formData.studyFormType = this.studyFormTypeArr.join(',')
} else {
this.infoDialog.formData.studyFormType = ''
}
},
save() { save() {
this.$refs['infoDialogForm'].validate(valid => { this.$refs['infoDialogForm'].validate(valid => {
if (valid) { if (valid) {

+ 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