Compare commits

..

No commits in common. "baf80675c5e0e84b0cf13911583c72554d82587f" and "1e5d751cc2ef282d60e88d25a12b109972cf1003" have entirely different histories.

3 changed files with 244 additions and 250 deletions

View File

@ -559,6 +559,7 @@ export default {
showCancelButton: false, showCancelButton: false,
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
}).catch(() => {}) }).catch(() => {})
e.stopImmediatePropagation() e.stopImmediatePropagation()
e.stopPropagation() e.stopPropagation()

View File

@ -1,249 +1,242 @@
<template> <template>
<el-container class="siteform-container"> <el-container class="siteform-container">
<el-header style="height:50px"> <el-header style="height:50px">
<div class="filter-container"> <div class="filter-container">
<!-- 中心名称 --> <!-- 中心名称 -->
<span>{{ $t('trials:customSite:form:siteName') }}:</span> <span>{{ $t('trials:customSite:form:siteName') }}:</span>
<el-input v-model="listQuery.SiteName" size="mini" class="mr" clearable /> <el-input v-model="listQuery.SiteName" size="mini" class="mr" clearable />
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" size="mini" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" size="mini" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button size="mini" type="primary" icon="el-icon-refresh-left" @click="handleReset"> <el-button size="mini" type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
<span style="margin-left:auto"> <span style="margin-left:auto">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleCustomSite" @click="handleCustomSite"
> >
{{ $t('trials:sitesList:dialogButton:customSite') }} {{ $t('trials:sitesList:dialogButton:customSite') }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
:disabled="selectArr.length === 0" :disabled="selectArr.length === 0"
:loading="assignLoadStatus" :loading="assignLoadStatus"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAssign" @click="handleAssign"
> >
{{ $t('trials:sitesList:dialogButton:addSite') }} {{ $t('trials:sitesList:dialogButton:addSite') }}
</el-button> </el-button>
</span> </span>
</div> </div>
</el-header> </el-header>
<el-main> <el-main>
<div class="data-table"> <div class="data-table">
<el-table <el-table
:data="list" :data="list"
stripe stripe
height="400px" height="400px"
class="site-table-list" class="site-table-list"
@selection-change="handleSelectChange" @selection-change="handleSelectChange"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="50" width="50"
:selectable="handleSelectable" :selectable="handleSelectable"
/> />
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column <el-table-column
prop="SiteName" prop="SiteName"
:label="$t('trials:customSite:form:siteName')" :label="$t('trials:customSite:form:siteName')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
min-width="120" min-width="120"
/> />
<el-table-column <el-table-column
prop="AliasName" prop="Country"
:label="$t('trials:customSite:form:AliasName')" :label="$t('trials:customSite:form:country')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
min-width="120" min-width="80"
/> />
<el-table-column <el-table-column
prop="Country" prop="City"
:label="$t('trials:customSite:form:country')" :label="$t('trials:customSite:form:city')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" min-width="80"
min-width="80" sortable="custom"
/> />
<el-table-column <el-table-column
prop="City" prop="Address"
:label="$t('trials:customSite:form:city')" :label="$t('trials:customSite:form:address')"
show-overflow-tooltip show-overflow-tooltip
min-width="80" sortable="custom"
sortable="custom" min-width="120"
/> />
<el-table-column </el-table>
prop="Address" </div>
:label="$t('trials:customSite:form:address')" </el-main>
show-overflow-tooltip <el-footer style="text-align: right;">
sortable="custom" <div class="pagination">
min-width="120" <pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
/> </div>
</el-table> </el-footer>
</div> <el-dialog
</el-main> v-if="customVisible"
<el-footer style="text-align: right;"> :visible.sync="customVisible"
<div class="pagination"> :close-on-click-modal="false"
<pagination :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" /> :title="$t('trials:customSite:title:custom')"
</div> width="600px"
</el-footer> custom-class="base-dialog-wrapper"
<el-dialog append-to-body
v-if="customVisible" >
:visible.sync="customVisible" <CustomSiteForm v-if="customVisible" @close="closeDialog" @getList="handleReset" />
:close-on-click-modal="false" </el-dialog>
:title="$t('trials:customSite:title:custom')" </el-container>
width="600px" </template>
custom-class="base-dialog-wrapper" <script>
append-to-body import { getTrialSiteScreeningList, addTrialSites } from '@/api/trials'
> import CustomSiteForm from './customSiteForm'
<CustomSiteForm v-if="customVisible" @close="closeDialog" @getList="handleReset" /> import Pagination from '@/components/Pagination'
</el-dialog> const getListQueryDefault = () => {
</el-container> return {
</template> SiteName: '',
<script> PageIndex: 1,
import { getTrialSiteScreeningList, addTrialSites } from '@/api/trials' PageSize: 20
import CustomSiteForm from './customSiteForm' }
import Pagination from '@/components/Pagination' }
const getListQueryDefault = () => { export default {
return { components: { Pagination, CustomSiteForm },
SiteName: '', data() {
PageIndex: 1, return {
PageSize: 20 list: [],
} total: 0,
} listQuery: getListQueryDefault(),
export default { selectArr: [],
components: { Pagination, CustomSiteForm }, assignLoadStatus: false,
data() { customVisible: false,
return { trialId: ''
list: [], }
total: 0, },
listQuery: getListQueryDefault(), mounted() {
selectArr: [], this.trialId = this.$route.query.trialId
assignLoadStatus: false, this.getList()
customVisible: false, },
trialId: '' methods: {
} getList() {
}, const loading = this.$loading({
mounted() { target: document.querySelector('.site-table-list'),
this.trialId = this.$route.query.trialId fullscreen: false,
this.getList() lock: true
}, })
methods: { this.listQuery.TrialId = this.trialId
getList() { getTrialSiteScreeningList(this.listQuery).then(res => {
const loading = this.$loading({ loading.close()
target: document.querySelector('.site-table-list'), this.list = res.Result.CurrentPageData
fullscreen: false, this.total = res.Result.TotalCount
lock: true }).catch(() => { loading.close() })
}) },
this.listQuery.TrialId = this.trialId handleCustomSite() {
getTrialSiteScreeningList(this.listQuery).then(res => { this.customVisible = true
loading.close() },
this.list = res.Result.CurrentPageData closeDialog() {
this.total = res.Result.TotalCount this.customVisible = false
}).catch(() => { loading.close() }) },
}, handleAssign() {
handleCustomSite() { this.$confirm(this.$t('trials:customSite:message:add'), {
this.customVisible = true type: 'warning',
}, distinguishCancelAndClose: true
closeDialog() { })
this.customVisible = false .then(() => {
}, const loading = this.$loading({
handleAssign() { target: document.querySelector('.site-table-list'),
this.$confirm(this.$t('trials:customSite:message:add'), { fullscreen: false,
type: 'warning', lock: true
distinguishCancelAndClose: true })
}) this.assignLoadStatus = true
.then(() => { addTrialSites(this.selectArr)
const loading = this.$loading({ .then(res => {
target: document.querySelector('.site-table-list'), this.assignLoadStatus = false
fullscreen: false, loading.close()
lock: true if (res.IsSuccess) {
}) this.$emit('closeDialog')
this.assignLoadStatus = true this.$message.success(this.$t('common:message:addedSuccessfully'))
addTrialSites(this.selectArr) }
.then(res => { }).catch(() => {
this.assignLoadStatus = false loading.close()
loading.close() this.assignLoadStatus = false
if (res.IsSuccess) { })
this.$emit('closeDialog') })
this.$message.success(this.$t('common:message:addedSuccessfully')) },
} handleSearch() {
}).catch(() => { this.listQuery.PageIndex = 1
loading.close() this.getList()
this.assignLoadStatus = false },
}) handleReset() {
}) this.listQuery = getListQueryDefault()
}, this.getList()
handleSearch() { },
this.listQuery.PageIndex = 1 handleSelectChange(val) {
this.getList() const arr = []
}, for (let index = 0; index < val.length; index++) {
handleReset() { const param = {
this.listQuery = getListQueryDefault() TrialId: this.trialId,
this.getList() SiteId: val[index].Id,
}, SiteName: val[index].SiteName
handleSelectChange(val) { }
const arr = [] arr.push(param)
for (let index = 0; index < val.length; index++) { }
const param = { this.selectArr = arr
TrialId: this.trialId, },
SiteId: val[index].Id, handleSortByColumn(column) {
SiteName: val[index].SiteName if (column.order === 'ascending') {
} this.listQuery.Asc = true
arr.push(param) } else {
} this.listQuery.Asc = false
this.selectArr = arr }
}, this.listQuery.SortField = column.prop
handleSortByColumn(column) { this.listQuery.PageIndex = 1
if (column.order === 'ascending') { this.getList()
this.listQuery.Asc = true },
} else { handleSelectable(row) {
this.listQuery.Asc = false if (!row.IsSelect) {
} return true
this.listQuery.SortField = column.prop } else {
this.listQuery.PageIndex = 1 return false
this.getList() }
}, }
handleSelectable(row) { }
if (!row.IsSelect) { }
return true </script>
} else { <style lang="scss" scoped>
return false .siteform-container{
} height: 100%;
} .el-header{
} .filter-container{
} display: flex;
</script> align-items: center;
<style lang="scss" scoped> span{
.siteform-container{ font-size:13px;
height: 100%; margin-right:5px;
.el-header{ }
.filter-container{ .mr{
display: flex; margin-right: 5px;
align-items: center; width: 120px;
span{ }
font-size:13px; }
margin-right:5px; }
} .el-main{
.mr{ padding: 0px;
margin-right: 5px; }
width: 120px; .el-footer{
} padding: 0 20px;
} }
} }
.el-main{ </style>
padding: 0px;
}
.el-footer{
padding: 0 20px;
}
}
</style>

View File

@ -1331,7 +1331,7 @@ export default {
}) })
if (!isgo) { if (!isgo) {
// `${isgoList.toString()}` // `${isgoList.toString()}`
this.$confirm(this.$t('trials:qcQuality:title:title1').replace('xxx', isgoList.join('、 ')), '',{ this.$confirm(this.$t('trials:qcQuality:title:title1').replace('xxx', isgoList.toString()), '',{
showCancelButton: false showCancelButton: false
}) })
return return