申办方、cro列表新增level字段
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
eec16c1a2c
commit
c18364104f
|
@ -3,21 +3,29 @@
|
|||
<div class="search">
|
||||
<el-form :inline="true" size="small" class="base-search-form">
|
||||
<el-form-item label="CRO Name:">
|
||||
<el-input v-model="searchData.CROName" style="width:100px;" />
|
||||
<el-input v-model="searchData.CROName" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch"
|
||||
>Search</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>Reset</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<span style="margin-left: auto">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left:auto;"
|
||||
style="margin-left: auto"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAddCro"
|
||||
>New</el-button>
|
||||
>New</el-button
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
@ -50,6 +58,16 @@
|
|||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="IsTrialLevel"
|
||||
label="Level"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("IsTrialLevel", String(scope.row.IsTrialLevel)) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Action" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -68,7 +86,13 @@
|
|||
</el-table-column>
|
||||
</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"
|
||||
/>
|
||||
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
|
@ -78,26 +102,32 @@
|
|||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<CroForm v-if="editVisible" :data="rowData" @close="close" @getList="getList" />
|
||||
<CroForm
|
||||
v-if="editVisible"
|
||||
:data="rowData"
|
||||
:IsTrialLevel="rowData.IsTrialLevel"
|
||||
@close="close"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getCROPageList, deleteCROCompany } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import CroForm from './CroForm'
|
||||
import { getCROPageList, deleteCROCompany } from "@/api/dictionary";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import CroForm from "./CroForm";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
CROName: '',
|
||||
CROName: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: true,
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
SortField: "",
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'Cros',
|
||||
name: "Cros",
|
||||
components: { BoxContent, Pagination, CroForm },
|
||||
data() {
|
||||
return {
|
||||
|
@ -107,84 +137,90 @@ export default {
|
|||
loading: false,
|
||||
rowData: {},
|
||||
editVisible: false,
|
||||
title: ''
|
||||
}
|
||||
title: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 获取CRO列表信息
|
||||
getList() {
|
||||
this.loading = true
|
||||
getCROPageList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.loading = true;
|
||||
getCROPageList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增CRO
|
||||
handleAddCro() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
this.rowData = {};
|
||||
this.title = "Add";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 编辑CRO
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
this.rowData = row;
|
||||
this.title = "Edit";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 删除CRO
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
deleteCROCompany(row.Id)
|
||||
.then(res => {
|
||||
this.loading = false
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
this.list.splice(
|
||||
this.list.findIndex((item) => item.Id === row.Id),
|
||||
1
|
||||
);
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 重置列表
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 指定排序字段,对列表进行排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 关闭模态框
|
||||
close() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.editVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.cros {
|
||||
|
|
|
@ -17,70 +17,98 @@
|
|||
<el-form-item label="CRO Code: " prop="CROCode">
|
||||
<el-input v-model="form.CROCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Level: " prop="CROCode">
|
||||
<el-switch
|
||||
:disabled="!IsTrialLevel"
|
||||
v-model="form.IsTrialLevel"
|
||||
:active-text="$fd('IsTrialLevel', 'true')"
|
||||
:inactive-text="$fd('IsTrialLevel', 'false')"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item>
|
||||
<el-button :disabled="btnLoading" type="primary" @click="handleCancel">Cancel</el-button>
|
||||
<el-button type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button :disabled="btnLoading" type="primary" @click="handleCancel"
|
||||
>Cancel</el-button
|
||||
>
|
||||
<el-button type="primary" :loading="btnLoading" @click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateCro } from '@/api/dictionary'
|
||||
import { addOrUpdateCro } from "@/api/dictionary";
|
||||
export default {
|
||||
name: 'CroForm',
|
||||
name: "CroForm",
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
},
|
||||
},
|
||||
IsTrialLevel: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btnLoading: false,
|
||||
form: {
|
||||
Id: '',
|
||||
CROName: '',
|
||||
CRONameCN: '',
|
||||
CROCode: ''
|
||||
Id: "",
|
||||
CROName: "",
|
||||
CRONameCN: "",
|
||||
CROCode: "",
|
||||
IsTrialLevel: true,
|
||||
},
|
||||
rules: {
|
||||
CROName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
CRONameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
CROCode: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }]
|
||||
}
|
||||
}
|
||||
CROName: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
{ max: 50, message: "The maximum length is 50" },
|
||||
],
|
||||
CRONameCN: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
{ max: 50, message: "The maximum length is 50" },
|
||||
],
|
||||
CROCode: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
{ max: 50, message: "The maximum length is 50" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (Object.keys(this.data).length && this.data.Id) {
|
||||
this.form = { ...this.data }
|
||||
this.form = { ...this.data };
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.CROForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.btnLoading = true
|
||||
addOrUpdateCro(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
this.$refs.CROForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.btnLoading = true;
|
||||
addOrUpdateCro(this.form)
|
||||
.then((res) => {
|
||||
this.btnLoading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$refs['CROForm'].resetFields()
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
this.$message.success("Saved successfully");
|
||||
this.$refs["CROForm"].resetFields();
|
||||
this.$emit("getList");
|
||||
this.$emit("close");
|
||||
}
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this.$emit("close");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<template>
|
||||
|
||||
<el-form
|
||||
ref="sponsorForm"
|
||||
:model="form"
|
||||
|
@ -18,70 +17,106 @@
|
|||
<el-form-item label="Sponsor Code: " prop="SponsorName">
|
||||
<el-input v-model="form.SponsorCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Level: " prop="CROCode">
|
||||
<el-switch
|
||||
:disabled="!IsTrialLevel"
|
||||
v-model="form.IsTrialLevel"
|
||||
:active-text="$fd('IsTrialLevel', 'true')"
|
||||
:inactive-text="$fd('IsTrialLevel', 'false')"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item>
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button
|
||||
:disabled="btnLoading"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleCancel"
|
||||
>Cancel</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:loading="btnLoading"
|
||||
@click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateSponsor } from '@/api/dictionary'
|
||||
import { addOrUpdateSponsor } from "@/api/dictionary";
|
||||
export default {
|
||||
name: 'SponsorForm',
|
||||
name: "SponsorForm",
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
},
|
||||
},
|
||||
IsTrialLevel: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btnLoading: false,
|
||||
form: {
|
||||
Id: '',
|
||||
SponsorName: '',
|
||||
SponsorNameCN: '',
|
||||
SponsorCode: '',
|
||||
Id: "",
|
||||
SponsorName: "",
|
||||
SponsorNameCN: "",
|
||||
SponsorCode: "",
|
||||
IsTrialLevel: true,
|
||||
},
|
||||
rules: {
|
||||
SponsorName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
SponsorNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
SponsorCode: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }]
|
||||
}
|
||||
}
|
||||
SponsorName: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
{ max: 50, message: "The maximum length is 50" },
|
||||
],
|
||||
SponsorNameCN: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
{ max: 50, message: "The maximum length is 50" },
|
||||
],
|
||||
SponsorCode: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
{ max: 50, message: "The maximum length is 50" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (Object.keys(this.data).length && this.data.Id) {
|
||||
this.form = { ...this.data }
|
||||
this.form = { ...this.data };
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.sponsorForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.btnLoading = true
|
||||
addOrUpdateSponsor(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
this.$refs.sponsorForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.btnLoading = true;
|
||||
addOrUpdateSponsor(this.form)
|
||||
.then((res) => {
|
||||
this.btnLoading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$refs['sponsorForm'].resetFields()
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
this.$message.success("Saved successfully");
|
||||
this.$refs["sponsorForm"].resetFields();
|
||||
this.$emit("getList");
|
||||
this.$emit("close");
|
||||
}
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this.$emit("close");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -3,21 +3,29 @@
|
|||
<div class="search">
|
||||
<el-form :inline="true" size="small" class="base-search-form">
|
||||
<el-form-item label="Sponsor Name:">
|
||||
<el-input v-model="searchData.SponsorName" style="width:100px;" />
|
||||
<el-input v-model="searchData.SponsorName" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch"
|
||||
>Search</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>Reset</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<span style="margin-left: auto">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left:auto;"
|
||||
style="margin-left: auto"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAddSponsor"
|
||||
>New</el-button>
|
||||
>New</el-button
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
@ -50,6 +58,16 @@
|
|||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="IsTrialLevel"
|
||||
label="Level"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("IsTrialLevel", String(scope.row.IsTrialLevel)) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Action" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -68,7 +86,13 @@
|
|||
</el-table-column>
|
||||
</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"
|
||||
/>
|
||||
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
|
@ -78,26 +102,32 @@
|
|||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<sponsor-form v-if="editVisible" :data="rowData" @close="close" @getList="getList" />
|
||||
<sponsor-form
|
||||
v-if="editVisible"
|
||||
:IsTrialLevel="rowData.IsTrialLevel"
|
||||
:data="rowData"
|
||||
@close="close"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getSponsorPageList, deleteSponsor } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import SponsorForm from './SponsorForm'
|
||||
import { getSponsorPageList, deleteSponsor } from "@/api/dictionary";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import SponsorForm from "./SponsorForm";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
SponsorName: '',
|
||||
SponsorName: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: true,
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
SortField: "",
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'Sponsors',
|
||||
name: "Sponsors",
|
||||
components: { BoxContent, Pagination, SponsorForm },
|
||||
data() {
|
||||
return {
|
||||
|
@ -107,84 +137,90 @@ export default {
|
|||
loading: false,
|
||||
rowData: {},
|
||||
editVisible: false,
|
||||
title: ''
|
||||
}
|
||||
title: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 获取Sponsors列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSponsorPageList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.loading = true;
|
||||
getSponsorPageList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增Sponsor
|
||||
handleAddSponsor() {
|
||||
this.rowData = {}
|
||||
this.title = 'Add'
|
||||
this.editVisible = true
|
||||
this.rowData = {};
|
||||
this.title = "Add";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 编辑Sponsor
|
||||
handleEdit(row) {
|
||||
this.rowData = row
|
||||
this.title = 'Edit'
|
||||
this.editVisible = true
|
||||
this.rowData = row;
|
||||
this.title = "Edit";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 删除Sponsor
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||
type: 'warning',
|
||||
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
deleteSponsor(row.Id)
|
||||
.then(res => {
|
||||
this.loading = false
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
this.list.splice(
|
||||
this.list.findIndex((item) => item.Id === row.Id),
|
||||
1
|
||||
);
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 重置列表
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 指定排序字段,对列表进行排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 关闭模态框
|
||||
close() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.editVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sponsors {
|
||||
|
|
Loading…
Reference in New Issue