中心列表展示字段变更
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
11b1e92488
commit
4c98f91677
|
@ -5,7 +5,7 @@
|
||||||
<el-form-item :label="$t('trials:site:table:siteId')">
|
<el-form-item :label="$t('trials:site:table:siteId')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.TrialSiteCode"
|
v-model="searchData.TrialSiteCode"
|
||||||
style="width:130px;"
|
style="width: 130px"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<el-form-item :label="$t('trials:site:table:site')">
|
<el-form-item :label="$t('trials:site:table:site')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.SiteName"
|
v-model="searchData.SiteName"
|
||||||
style="width:130px;"
|
style="width: 130px"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<el-form-item :label="$t('trials:site:table:staff')">
|
<el-form-item :label="$t('trials:site:table:staff')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.UserKeyInfo"
|
v-model="searchData.UserKeyInfo"
|
||||||
style="width:130px;"
|
style="width: 130px"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -29,18 +29,22 @@
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- 查询 -->
|
<!-- 查询 -->
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
{{ $t('common:button:search') }}
|
{{ $t("common:button:search") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
<el-button
|
||||||
{{ $t('common:button:reset') }}
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>
|
||||||
|
{{ $t("common:button:reset") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="main-container">
|
<template slot="main-container">
|
||||||
<el-table
|
<el-table
|
||||||
v-adaptive="{bottomOffset:60}"
|
v-adaptive="{ bottomOffset: 60 }"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
|
@ -58,25 +62,17 @@
|
||||||
/>
|
/>
|
||||||
<!-- 中心名称 -->
|
<!-- 中心名称 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="TrialSiteAliasName"
|
prop="TrialSiteName"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
:label="$t('trials:site:table:site')"
|
:label="$t('trials:site:table:site')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<!-- City -->
|
<!-- 中心别名 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="City"
|
prop="TrialSiteAliasName"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
:label="$t('trials:site:table:city')"
|
:label="$t('trials:site:table:TrialSiteAliasName')"
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
/>
|
|
||||||
<!-- Country -->
|
|
||||||
<el-table-column
|
|
||||||
prop="Country"
|
|
||||||
min-width="100"
|
|
||||||
:label="$t('trials:site:table:country')"
|
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
|
@ -105,14 +101,28 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.UserCount > 0" type="text" @click="getStaffList(scope.row)">
|
<el-button
|
||||||
{{ scope.row.UserNameList.length>0 ? scope.row.UserNameList.join(', ') :'' }}
|
v-if="scope.row.UserCount > 0"
|
||||||
|
type="text"
|
||||||
|
@click="getStaffList(scope.row)"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
scope.row.UserNameList.length > 0
|
||||||
|
? scope.row.UserNameList.join(", ")
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
<pagination
|
||||||
|
class="page"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="searchData.PageIndex"
|
||||||
|
:limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<base-model v-if="crc_model.visible" :config="crc_model">
|
<base-model v-if="crc_model.visible" :config="crc_model">
|
||||||
<template slot="dialog-body">
|
<template slot="dialog-body">
|
||||||
|
@ -153,8 +163,12 @@
|
||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('IsUserExitTrial', scope.row.IsDeleted) }}</el-tag>
|
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||||
<el-tag v-else>{{ $fd('IsUserExitTrial', scope.row.IsDeleted) }}</el-tag>
|
$fd("IsUserExitTrial", scope.row.IsDeleted)
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-else>{{
|
||||||
|
$fd("IsUserExitTrial", scope.row.IsDeleted)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 授权时间 -->
|
<!-- 授权时间 -->
|
||||||
|
@ -173,30 +187,29 @@
|
||||||
sortable
|
sortable
|
||||||
min-width="150"
|
min-width="150"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getSiteCRCList, getTrialSiteCRCList } from '@/api/trials'
|
import { getSiteCRCList, getTrialSiteCRCList } from "@/api/trials";
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
import BaseContainer from "@/components/BaseContainer";
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from "@/components/BaseModel";
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from "@/components/Pagination";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
UserRealName: '',
|
UserRealName: "",
|
||||||
SiteName: '',
|
SiteName: "",
|
||||||
SortField: 'TrialSiteCode',
|
SortField: "TrialSiteCode",
|
||||||
Asc: true,
|
Asc: true,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
TrialSiteCode: null
|
TrialSiteCode: null,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'SiteList',
|
name: "SiteList",
|
||||||
components: { BaseContainer, BaseModel, Pagination },
|
components: { BaseContainer, BaseModel, Pagination },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -204,55 +217,67 @@ export default {
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
crc_model: { visible: false, title: this.$t('trials:site:dialogTitle:staff'), width: '60%' },
|
crc_model: {
|
||||||
userListLoading: '',
|
visible: false,
|
||||||
|
title: this.$t("trials:site:dialogTitle:staff"),
|
||||||
|
width: "60%",
|
||||||
|
},
|
||||||
|
userListLoading: "",
|
||||||
userList: [],
|
userList: [],
|
||||||
trialId: ''
|
trialId: "",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId;
|
||||||
|
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
this.searchData.TrialId = this.trialId
|
this.searchData.TrialId = this.trialId;
|
||||||
getSiteCRCList(this.searchData).then(res => {
|
getSiteCRCList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false;
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData;
|
||||||
}).catch(() => { this.loading = false })
|
this.total = res.Result.TotalCount;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getStaffList(row) {
|
getStaffList(row) {
|
||||||
this.currentRow = { ...row }
|
this.currentRow = { ...row };
|
||||||
this.crc_model.visible = true
|
this.crc_model.visible = true;
|
||||||
this.userListLoading = true
|
this.userListLoading = true;
|
||||||
getTrialSiteCRCList(this.trialId, this.currentRow.SiteId).then(res => {
|
getTrialSiteCRCList(this.trialId, this.currentRow.SiteId)
|
||||||
this.userListLoading = false
|
.then((res) => {
|
||||||
this.userList = res.Result
|
this.userListLoading = false;
|
||||||
}).catch(() => { this.userListLoading = false })
|
this.userList = res.Result;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.userListLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortChange(column) {
|
handleSortChange(column) {
|
||||||
if (column.order === 'ascending') {
|
if (column.order === "ascending") {
|
||||||
this.searchData.Asc = true
|
this.searchData.Asc = true;
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false
|
this.searchData.Asc = false;
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop;
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue