admin项目用户角色权限配置、部分国际化问题解决
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
cbcb84a768
commit
041266c250
|
@ -37,7 +37,7 @@
|
||||||
<span> {{ $fd('IsEnable', !scope.row.IsUserRoleDisabled) }}</span>
|
<span> {{ $fd('IsEnable', !scope.row.IsUserRoleDisabled) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('common:action:action')" width="120px">
|
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
|
@ -154,7 +154,8 @@
|
||||||
<el-button
|
<el-button
|
||||||
v-if="
|
v-if="
|
||||||
Array.isArray(scope.row.TrialUserRoleList) &&
|
Array.isArray(scope.row.TrialUserRoleList) &&
|
||||||
scope.row.TrialUserRoleList.length > 0
|
scope.row.TrialUserRoleList.length > 0 &&
|
||||||
|
hasPermi(['trials:trials-panel:setting:personnel-manage:status'])
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
@click.stop="openRoleList(scope.row)"
|
@click.stop="openRoleList(scope.row)"
|
||||||
|
@ -179,6 +180,32 @@
|
||||||
).join(', ')
|
).join(', ')
|
||||||
}}</span>
|
}}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<div
|
||||||
|
v-else-if="
|
||||||
|
Array.isArray(scope.row.TrialUserRoleList) &&
|
||||||
|
scope.row.TrialUserRoleList.length > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
:content="$t('trials:staff:tip:userTypeDisabled')"
|
||||||
|
placement="top"
|
||||||
|
style="margin-right: 2px"
|
||||||
|
v-if="
|
||||||
|
scope.row.TrialUserRoleList.some(
|
||||||
|
(item) => item.IsDeleted || item.IsUserRoleDisabled
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<i class="el-icon-warning icon-i"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
<span>{{
|
||||||
|
scope.row.TrialUserRoleList.map(
|
||||||
|
(item) => item.UserTypeShortName
|
||||||
|
).join(', ')
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 联系电话 -->
|
<!-- 联系电话 -->
|
||||||
|
@ -479,7 +506,10 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
<el-table-column
|
||||||
|
:label="$t('common:action:action')"
|
||||||
|
min-width="120px"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<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
|
<el-button
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="handleReset"
|
@click="handleReset"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:reset") }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -101,15 +101,11 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="getStaffList(scope.row)">
|
||||||
v-if="scope.row.UserCount > 0"
|
|
||||||
type="text"
|
|
||||||
@click="getStaffList(scope.row)"
|
|
||||||
>
|
|
||||||
{{
|
{{
|
||||||
scope.row.UserNameList.length > 0
|
scope.row.UserNameList.length > 0
|
||||||
? scope.row.UserNameList.join(", ")
|
? scope.row.UserNameList.join(', ')
|
||||||
: ""
|
: ''
|
||||||
}}
|
}}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -164,10 +160,10 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||||
$fd("IsUserExitTrial", scope.row.IsDeleted)
|
$fd('IsUserExitTrial', scope.row.IsDeleted)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
<el-tag v-else>{{
|
<el-tag v-else>{{
|
||||||
$fd("IsUserExitTrial", scope.row.IsDeleted)
|
$fd('IsUserExitTrial', scope.row.IsDeleted)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -193,23 +189,23 @@
|
||||||
</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 {
|
||||||
|
@ -219,65 +215,65 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
crc_model: {
|
crc_model: {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: this.$t("trials:site:dialogTitle:staff"),
|
title: this.$t('trials:site:dialogTitle:staff'),
|
||||||
width: "60%",
|
width: '60%',
|
||||||
},
|
},
|
||||||
userListLoading: "",
|
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)
|
getSiteCRCList(this.searchData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
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.TrialSiteId)
|
getTrialSiteCRCList(this.trialId, this.currentRow.TrialSiteId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.userListLoading = false;
|
this.userListLoading = false
|
||||||
this.userList = res.Result;
|
this.userList = res.Result
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.userListLoading = false;
|
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