Compare commits
No commits in common. "6ca9ed8a9ba04c773720a8a2b0c717b690f28a2c" and "870ca871f46c8fe0f9793cc8dddcf785be4fbc46" have entirely different histories.
6ca9ed8a9b
...
870ca871f4
|
@ -13,14 +13,9 @@
|
||||||
<el-input v-model="form.SiteCode" disabled />
|
<el-input v-model="form.SiteCode" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 中心名称 -->
|
<el-form-item label="Site Name: " prop="SiteName">
|
||||||
<el-form-item :label="$t('trials:customSite:form:siteName')" prop="SiteName">
|
|
||||||
<el-input v-model="form.SiteName" />
|
<el-input v-model="form.SiteName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 中心名称(CN) -->
|
|
||||||
<el-form-item :label="$t('trials:customSite:form:siteName') + '(CN)'" v-if="!show" prop="SiteNameCN">
|
|
||||||
<el-input v-model="form.SiteNameCN" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="Alias Name: ">
|
<el-form-item label="Alias Name: ">
|
||||||
<el-input v-model="form.AliasName" />
|
<el-input v-model="form.AliasName" />
|
||||||
|
@ -118,10 +113,6 @@ export default {
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{ max: 50, message: 'The maximum length is 50' }
|
||||||
],
|
],
|
||||||
SiteNameCN: [
|
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
|
||||||
],
|
|
||||||
SiteCode: [
|
SiteCode: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{ max: 50, message: 'The maximum length is 50' }
|
||||||
|
@ -153,13 +144,11 @@ export default {
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{ max: 50, message: 'The maximum length is 50' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false
|
||||||
show: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initForm()
|
this.initForm()
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === '/usa/dist'
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSave() {
|
handleSave() {
|
||||||
|
|
|
@ -1,194 +1,183 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form
|
<el-form
|
||||||
ref="customSiteForm"
|
ref="customSiteForm"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:model="form"
|
:model="form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
size="small"
|
size="small"
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
>
|
>
|
||||||
<div class="base-dialog-body">
|
<div class="base-dialog-body">
|
||||||
<!-- 中心编号 -->
|
<!-- 中心编号 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:siteId')" prop="SiteCode">
|
<el-form-item :label="$t('trials:customSite:form:siteId')" prop="SiteCode">
|
||||||
<el-input v-model="form.SiteCode" />
|
<el-input v-model="form.SiteCode" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 中心名称 -->
|
<!-- 中心名称 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:siteName')" prop="SiteName">
|
<el-form-item :label="$t('trials:customSite:form:siteName')" prop="SiteName">
|
||||||
<el-input v-model="form.SiteName" />
|
<el-input v-model="form.SiteName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 中心名称(CN) -->
|
<!-- 组织机构代码 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:siteName') + '(CN)'" v-if="!show" prop="SiteNameCN">
|
<el-form-item :label="$t('trials:customSite:form:orgCode')">
|
||||||
<el-input v-model="form.SiteNameCN" />
|
<el-input v-model="form.UniqueCode" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 组织机构代码 -->
|
<!-- 国家 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:orgCode')">
|
<el-form-item :label="$t('trials:customSite:form:country')" prop="Country">
|
||||||
<el-input v-model="form.UniqueCode" />
|
<el-input v-model="form.Country" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 国家 -->
|
<!-- 城市 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:country')" prop="Country">
|
<el-form-item :label="$t('trials:customSite:form:city')" prop="City">
|
||||||
<el-input v-model="form.Country" />
|
<el-input v-model="form.City" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 城市 -->
|
<!-- 地址 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:city')" prop="City">
|
<el-form-item :label="$t('trials:customSite:form:address')" prop="Address">
|
||||||
<el-input v-model="form.City" />
|
<el-input v-model="form.Address" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 地址 -->
|
<!-- 附属医院 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:address')" prop="Address">
|
<el-form-item :label="$t('trials:customSite:form:hospital')">
|
||||||
<el-input v-model="form.Address" />
|
<el-select
|
||||||
</el-form-item>
|
v-model="form.HospitalId"
|
||||||
<!-- 附属医院 -->
|
clearable
|
||||||
<el-form-item :label="$t('trials:customSite:form:hospital')">
|
style="width:100%;"
|
||||||
<el-select
|
>
|
||||||
v-model="form.HospitalId"
|
<el-option
|
||||||
clearable
|
v-for="item in hospitalList"
|
||||||
style="width:100%;"
|
:key="item.Id"
|
||||||
>
|
:label="item.HospitalName"
|
||||||
<el-option
|
:value="item.Id"
|
||||||
v-for="item in hospitalList"
|
/>
|
||||||
:key="item.Id"
|
</el-select>
|
||||||
:label="item.HospitalName"
|
</el-form-item>
|
||||||
:value="item.Id"
|
<!-- 负责人 -->
|
||||||
/>
|
<el-form-item :label="$t('trials:customSite:form:director')" prop="DirectorName">
|
||||||
</el-select>
|
<el-input v-model="form.DirectorName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 负责人 -->
|
<!-- 负责人电话 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:director')" prop="DirectorName">
|
<el-form-item :label="$t('trials:customSite:form:directorPhone')" prop="DirectorPhone">
|
||||||
<el-input v-model="form.DirectorName" />
|
<el-input v-model="form.DirectorPhone" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 负责人电话 -->
|
<!-- 联系人 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:directorPhone')" prop="DirectorPhone">
|
<el-form-item :label="$t('trials:customSite:form:contactor')" prop="ContactName">
|
||||||
<el-input v-model="form.DirectorPhone" />
|
<el-input v-model="form.ContactName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 联系人 -->
|
<!-- 联系人电话 -->
|
||||||
<el-form-item :label="$t('trials:customSite:form:contactor')" prop="ContactName">
|
<el-form-item :label="$t('trials:customSite:form:contactorPhone')" prop="ContactPhone">
|
||||||
<el-input v-model="form.ContactName" />
|
<el-input v-model="form.ContactPhone" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 联系人电话 -->
|
</div>
|
||||||
<el-form-item :label="$t('trials:customSite:form:contactorPhone')" prop="ContactPhone">
|
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||||
<el-input v-model="form.ContactPhone" />
|
<el-form-item>
|
||||||
</el-form-item>
|
<!-- 取消 -->
|
||||||
</div>
|
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">
|
||||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
{{ $t('common:button:cancel') }}
|
||||||
<el-form-item>
|
</el-button>
|
||||||
<!-- 取消 -->
|
<!-- 保存 -->
|
||||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">
|
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
|
||||||
{{ $t('common:button:cancel') }}
|
{{ $t('common:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 保存 -->
|
</el-form-item>
|
||||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
|
</div>
|
||||||
{{ $t('common:button:save') }}
|
</el-form>
|
||||||
</el-button>
|
</template>
|
||||||
</el-form-item>
|
<script>
|
||||||
</div>
|
import { addOrUpdateSite } from '@/api/dictionary'
|
||||||
</el-form>
|
import store from '@/store'
|
||||||
</template>
|
export default {
|
||||||
<script>
|
name: 'CustomSiteForm',
|
||||||
import { addOrUpdateSite } from '@/api/dictionary'
|
props: {
|
||||||
import store from '@/store'
|
data: {
|
||||||
export default {
|
type: Object,
|
||||||
name: 'CustomSiteForm',
|
default() {
|
||||||
props: {
|
return {}
|
||||||
data: {
|
}
|
||||||
type: Object,
|
}
|
||||||
default() {
|
},
|
||||||
return {}
|
data() {
|
||||||
}
|
return {
|
||||||
}
|
btnLoading: false,
|
||||||
},
|
hospitalList: [],
|
||||||
data() {
|
form: {
|
||||||
return {
|
Id: '',
|
||||||
btnLoading: false,
|
SiteCode: '',
|
||||||
hospitalList: [],
|
SiteName: '',
|
||||||
form: {
|
Country: '',
|
||||||
Id: '',
|
City: '',
|
||||||
SiteCode: '',
|
HospitalId: '',
|
||||||
SiteName: '',
|
DirectorName: '',
|
||||||
SiteNameCN: '',
|
DirectorPhone: '',
|
||||||
Country: '',
|
ContactName: '',
|
||||||
City: '',
|
ContactPhone: '',
|
||||||
HospitalId: '',
|
UniqueCode: '',
|
||||||
DirectorName: '',
|
Address: ''
|
||||||
DirectorPhone: '',
|
},
|
||||||
ContactName: '',
|
rules: {
|
||||||
ContactPhone: '',
|
SiteName: [
|
||||||
UniqueCode: '',
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||||
Address: ''
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
},
|
],
|
||||||
rules: {
|
SiteCode: [
|
||||||
SiteName: [
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
],
|
||||||
],
|
Country: [
|
||||||
SiteNameCN: [
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
],
|
||||||
],
|
City: [
|
||||||
SiteCode: [
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
],
|
||||||
],
|
// HospitalId: [
|
||||||
Country: [
|
// { required: true, message: 'Please specify', trigger: 'blur' }
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
// ],
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
Address: [
|
||||||
],
|
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
||||||
City: [
|
],
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
DirectorName: [
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
],
|
],
|
||||||
// HospitalId: [
|
DirectorPhone: [
|
||||||
// { required: true, message: 'Please specify', trigger: 'blur' }
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
// ],
|
],
|
||||||
Address: [
|
ContactName: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
],
|
],
|
||||||
DirectorName: [
|
ContactPhone: [
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||||
],
|
]
|
||||||
DirectorPhone: [
|
},
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
loading: false
|
||||||
],
|
}
|
||||||
ContactName: [
|
},
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
mounted() {
|
||||||
],
|
this.initForm()
|
||||||
ContactPhone: [
|
},
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
methods: {
|
||||||
]
|
handleSave() {
|
||||||
},
|
this.$refs.customSiteForm.validate(valid => {
|
||||||
loading: false,
|
if (!valid) return
|
||||||
show: false
|
this.btnLoading = true
|
||||||
}
|
addOrUpdateSite(this.form).then(res => {
|
||||||
},
|
this.btnLoading = false
|
||||||
mounted() {
|
if (res.IsSuccess) {
|
||||||
this.initForm()
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === '/usa/dist'
|
this.$emit('getList')
|
||||||
},
|
this.$emit('close')
|
||||||
methods: {
|
}
|
||||||
handleSave() {
|
}).catch(() => {
|
||||||
this.$refs.customSiteForm.validate(valid => {
|
this.btnLoading = false
|
||||||
if (!valid) return
|
})
|
||||||
this.btnLoading = true
|
})
|
||||||
addOrUpdateSite(this.form).then(res => {
|
},
|
||||||
this.btnLoading = false
|
handleCancel() {
|
||||||
if (res.IsSuccess) {
|
this.$emit('close')
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
},
|
||||||
this.$emit('getList')
|
async initForm() {
|
||||||
this.$emit('close')
|
this.loading = true
|
||||||
}
|
this.hospitalList = await store.dispatch('global/getHospital')
|
||||||
}).catch(() => {
|
this.loading = false
|
||||||
this.btnLoading = false
|
}
|
||||||
})
|
}
|
||||||
})
|
|
||||||
},
|
}
|
||||||
handleCancel() {
|
</script>
|
||||||
this.$emit('close')
|
|
||||||
},
|
|
||||||
async initForm() {
|
|
||||||
this.loading = true
|
|
||||||
this.hospitalList = await store.dispatch('global/getHospital')
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
<!-- 下载模板 -->
|
<!-- 下载模板 -->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-hasPermi="['trials:trials-panel:visit:consistency-check:upload']"
|
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
@click="handleDownload"
|
@click="handleDownload"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue