Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
a185f4755a
|
@ -3,7 +3,7 @@
|
||||||
ref="sysTemplateFrom"
|
ref="sysTemplateFrom"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:model="form"
|
:model="form"
|
||||||
label-width="90px"
|
label-width="140px"
|
||||||
size="small"
|
size="small"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
class="upload-temporary-file"
|
class="upload-temporary-file"
|
||||||
|
@ -12,10 +12,13 @@
|
||||||
<el-form-item label="Code" prop="Code">
|
<el-form-item label="Code" prop="Code">
|
||||||
<el-input v-model="form.Code" />
|
<el-input v-model="form.Code" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务场景: " prop="BusinessScenarioEnum">
|
<el-form-item
|
||||||
|
:label="$t('dictionary:attachment:export:form:business')"
|
||||||
|
prop="BusinessScenarioEnum"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.BusinessScenarioEnum"
|
v-model="form.BusinessScenarioEnum"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
|
@ -27,7 +30,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件: ">
|
<el-form-item :label="$t('dictionary:attachment:export:form:file')">
|
||||||
<div class="upload-container">
|
<div class="upload-container">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
|
@ -43,84 +46,123 @@
|
||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="btnLoading">Select</el-button>
|
<el-button
|
||||||
<span
|
size="small"
|
||||||
slot="tip"
|
type="primary"
|
||||||
style="margin-left:10px;"
|
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||||
class="el-upload__tip"
|
:loading="btnLoading"
|
||||||
|
>Select</el-button
|
||||||
>
|
>
|
||||||
|
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||||
(must be in xlsx/xls/doc/docx format)
|
(must be in xlsx/xls/doc/docx format)
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件名" prop="Name">
|
<el-form-item
|
||||||
|
:label="$t('dictionary:attachment:export:form:name')"
|
||||||
|
prop="Name"
|
||||||
|
>
|
||||||
<el-input v-model="form.Name" />
|
<el-input v-model="form.Name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
<el-form-item
|
||||||
|
:label="$t('dictionary:attachment:export:form:nameCN')"
|
||||||
|
prop="NameCN"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.NameCN" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="form.Id !== ''"
|
||||||
|
:label="$t('dictionary:attachment:export:form:isDeleted')"
|
||||||
|
>
|
||||||
<el-radio-group v-model="form.IsDeleted">
|
<el-radio-group v-model="form.IsDeleted">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
<el-radio :label="false">否</el-radio>
|
<el-radio :label="false">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述">
|
<el-form-item
|
||||||
|
:label="$t('dictionary:attachment:export:form:description')"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Description"
|
v-model="form.Description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 2, maxRows: 4}"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
placeholder="请输入内容"
|
placeholder=""
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</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 style="text-align:right;">
|
<el-form-item style="text-align: right">
|
||||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||||
|
:loading="saveBtnLoading"
|
||||||
|
@click="handleSave"
|
||||||
|
>{{ $t("common:button:save") }}</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdateCommonDocument, uploadCommonDoc, Upload } from '@/api/dictionary'
|
import {
|
||||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
addOrUpdateCommonDocument,
|
||||||
|
uploadCommonDoc,
|
||||||
|
Upload,
|
||||||
|
} from "@/api/dictionary";
|
||||||
|
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
|
||||||
export default {
|
export default {
|
||||||
name: 'TemplateForm',
|
name: "TemplateForm",
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() { return {} }
|
default() {
|
||||||
}
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
Id: '',
|
Id: "",
|
||||||
Code: '',
|
Code: "",
|
||||||
FileTypeEnum: null,
|
FileTypeEnum: null,
|
||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
Name: '',
|
Name: "",
|
||||||
Path: '',
|
NameCN: "",
|
||||||
Description: '',
|
Path: "",
|
||||||
IsDeleted: false
|
Description: "",
|
||||||
|
IsDeleted: false,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
Code: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
Code: [
|
||||||
Name: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
],
|
||||||
|
Name: [
|
||||||
|
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
NameCN: [
|
||||||
|
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
BusinessScenarioEnum: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
saveBtnLoading: false,
|
saveBtnLoading: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initForm()
|
this.initForm();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initForm() {
|
async initForm() {
|
||||||
await this.getDicData()
|
await this.getDicData();
|
||||||
if (Object.keys(this.data).length > 0) {
|
if (Object.keys(this.data).length > 0) {
|
||||||
if (this.data.Path) {
|
if (this.data.Path) {
|
||||||
this.fileList = [
|
this.fileList = [
|
||||||
|
@ -128,97 +170,111 @@ export default {
|
||||||
name: this.data.Name,
|
name: this.data.Name,
|
||||||
path: this.data.Path,
|
path: this.data.Path,
|
||||||
url: this.data.Path,
|
url: this.data.Path,
|
||||||
type: this.data.Type
|
type: this.data.Type,
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
for (const k in this.form) {
|
for (const k in this.form) {
|
||||||
if (this.data.hasOwnProperty(k)) {
|
if (this.data.hasOwnProperty(k)) {
|
||||||
this.form[k] = this.data[k]
|
this.form[k] = this.data[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取文件类型下拉框
|
// 获取文件类型下拉框
|
||||||
getDicData() {
|
getDicData() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type']).then(res => {
|
getBasicDataSelects(["Common_File_ModuleType", "Common_File_Type"])
|
||||||
this.dictionaryList = { ...res.Result }
|
.then((res) => {
|
||||||
this.loading = false
|
this.dictionaryList = { ...res.Result };
|
||||||
}).catch(() => {
|
this.loading = false;
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
// 检测文件类型是否符合要求
|
// 检测文件类型是否符合要求
|
||||||
if (this.checkFileSuffix(file.name)) {
|
if (this.checkFileSuffix(file.name)) {
|
||||||
this.fileList = []
|
this.fileList = [];
|
||||||
return true
|
return true;
|
||||||
} else {
|
} else {
|
||||||
this.$alert('必须是word/excel格式')
|
// this.$alert("必须是word/excel格式");
|
||||||
|
this.$alert(this.$t("dictionary:attachment:export:alert:formatFile"));
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handleUploadFile(param) {
|
async handleUploadFile(param) {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
const formData = new FormData()
|
const formData = new FormData();
|
||||||
formData.append('file', param.file)
|
formData.append("file", param.file);
|
||||||
this.form.FileName = param.file.name
|
this.form.FileName = param.file.name;
|
||||||
Upload(formData, 1).then(res => {
|
Upload(formData, 1).then((res) => {
|
||||||
this.fileList.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
this.fileList.push({
|
||||||
this.form.Path = res.Result.FilePath
|
name: param.file.name,
|
||||||
this.form.Name = param.file.name
|
path: res.Result.FilePath,
|
||||||
this.loading = false
|
fullPath: res.Result.FullFilePath,
|
||||||
this.btnLoading = false
|
url: res.Result.FilePath,
|
||||||
})
|
});
|
||||||
|
this.form.Path = res.Result.FilePath;
|
||||||
|
this.form.NameCN = param.file.name;
|
||||||
|
this.loading = false;
|
||||||
|
this.btnLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.sysTemplateFrom.validate(valid => {
|
this.$refs.sysTemplateFrom.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return;
|
||||||
if (!this.form.Name) {
|
if (!this.form.Name) {
|
||||||
this.$alert('Please select file.')
|
this.$alert("Please select file.");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.saveBtnLoading = true
|
this.saveBtnLoading = true;
|
||||||
addOrUpdateCommonDocument(this.form).then(res => {
|
addOrUpdateCommonDocument(this.form)
|
||||||
this.saveBtnLoading = false
|
.then((res) => {
|
||||||
this.$emit('closeDialog')
|
this.saveBtnLoading = false;
|
||||||
this.$emit('getList')
|
this.$emit("closeDialog");
|
||||||
this.$message.success('Uploaded successfully')
|
this.$emit("getList");
|
||||||
}).catch(() => {
|
this.$message.success(
|
||||||
this.saveBtnLoading = false
|
this.$t("trials:uploadMonitor:table:uploadStatus")
|
||||||
})
|
);
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.saveBtnLoading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleRemoveFile() {
|
handleRemoveFile() {
|
||||||
this.fileList = []
|
this.fileList = [];
|
||||||
this.form.Path = ''
|
this.form.Path = "";
|
||||||
this.form.Name = ''
|
this.form.NameCN = "";
|
||||||
|
this.form.Name = "";
|
||||||
},
|
},
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
if (file.fullPath) {
|
if (file.fullPath) {
|
||||||
window.open(file.fullPath, '_blank')
|
window.open(file.fullPath, "_blank");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExceed(files, fileList) {
|
handleExceed(files, fileList) {
|
||||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
this.$message.warning(`Upload is currently limited to 1 file`);
|
||||||
},
|
},
|
||||||
checkFileSuffix(fileName) {
|
checkFileSuffix(fileName) {
|
||||||
var typeArr = ['xls', 'xlsx', 'doc', 'docx']
|
var typeArr = ["xls", "xlsx", "doc", "docx"];
|
||||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
var extendName = fileName
|
||||||
|
.substring(fileName.lastIndexOf(".") + 1)
|
||||||
|
.toLocaleLowerCase();
|
||||||
if (typeArr.indexOf(extendName) !== -1) {
|
if (typeArr.indexOf(extendName) !== -1) {
|
||||||
return true
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.upload-temporary-file{
|
.upload-temporary-file {
|
||||||
.upload-container .el-upload--text {
|
.upload-container .el-upload--text {
|
||||||
border: none;
|
border: none;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
@ -231,8 +287,8 @@ export default {
|
||||||
color: #428bca;
|
color: #428bca;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.account_item_clear{
|
.account_item_clear {
|
||||||
.el-tag__close{
|
.el-tag__close {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
<BaseContainer>
|
<BaseContainer>
|
||||||
<template slot="search-container">
|
<template slot="search-container">
|
||||||
<el-form :inline="true" size="small">
|
<el-form :inline="true" size="small">
|
||||||
<el-form-item label="业务场景">
|
<el-form-item
|
||||||
|
:label="$t('dictionary:attachment:export:search:business')"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.BusinessScenarioEnum"
|
v-model="searchData.BusinessScenarioEnum"
|
||||||
style="width:150px;"
|
style="width: 150px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.Common_File_BusinessScenario"
|
v-for="item of $d.Common_File_BusinessScenario"
|
||||||
|
@ -13,41 +15,42 @@
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件名称">
|
<el-form-item
|
||||||
<el-input
|
:label="$t('dictionary:attachment:export:search:fileName')"
|
||||||
v-model="searchData.Name"
|
>
|
||||||
style="width:130px;"
|
<el-input v-model="searchData.Name" style="width: 130px" clearable />
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<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-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
style="float: right"
|
||||||
|
size="small"
|
||||||
|
@click="handleAdd"
|
||||||
|
>
|
||||||
|
{{ $t("common:button:new") }}
|
||||||
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
style="margin-left:auto;"
|
|
||||||
size="small"
|
|
||||||
@click="handleAdd"
|
|
||||||
>
|
|
||||||
{{ $t('common:button:new') }}
|
|
||||||
</el-button>
|
|
||||||
</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
|
||||||
|
@ -64,70 +67,81 @@
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="BusinessScenarioEnum"
|
prop="BusinessScenarioEnum"
|
||||||
label="业务场景"
|
:label="$t('dictionary:attachment:export:table:business')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('Common_File_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
{{
|
||||||
|
$fd(
|
||||||
|
"Common_File_BusinessScenario",
|
||||||
|
scope.row.BusinessScenarioEnum
|
||||||
|
)
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Name"
|
prop="Name"
|
||||||
label="文件名称"
|
:label="$t('dictionary:attachment:export:table:name')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="NameCN"
|
||||||
|
:label="$t('dictionary:attachment:export:table:nameCN')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Description"
|
prop="Description"
|
||||||
label="描述"
|
:label="$t('dictionary:attachment:export:table:description')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="IsDeleted"
|
prop="IsDeleted"
|
||||||
label="是否废除"
|
:label="$t('dictionary:attachment:export:table:isDeleted')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
$fd("YesOrNo", scope.row.IsDeleted)
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd("YesOrNo", scope.row.IsDeleted)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="UpdateTime"
|
prop="UpdateTime"
|
||||||
label="更新时间"
|
:label="$t('dictionary:attachment:export:table:updateTime')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column label="Action">
|
<el-table-column :label="$t('common:action:action')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="handleDownload(scope.row)">
|
||||||
type="text"
|
{{ $t("common:button:download") }}
|
||||||
@click="handleDownload(scope.row)"
|
|
||||||
>
|
|
||||||
下载
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="text" @click="handleEdit(scope.row)">
|
||||||
type="text"
|
{{ $t("common:button:edit") }}
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="text" @click="handleDelete(scope.row)">
|
||||||
type="text"
|
{{ $t("common:button:delete") }}
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</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"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 新增/编辑 -->
|
<!-- 新增/编辑 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
@ -138,28 +152,36 @@
|
||||||
width="600px"
|
width="600px"
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
<TemplateForm
|
||||||
|
:data="currentRow"
|
||||||
|
@closeDialog="closeDialog"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCommonDocumentList, DownloadCommonDoc, deleteCommonDocument } from '@/api/dictionary'
|
import {
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
getCommonDocumentList,
|
||||||
import Pagination from '@/components/Pagination'
|
DownloadCommonDoc,
|
||||||
import TemplateForm from './TemplateForm'
|
deleteCommonDocument,
|
||||||
const FileTypeEnum = 2
|
} from "@/api/dictionary";
|
||||||
|
import BaseContainer from "@/components/BaseContainer";
|
||||||
|
import Pagination from "@/components/Pagination";
|
||||||
|
import TemplateForm from "./TemplateForm";
|
||||||
|
const FileTypeEnum = 2;
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
FileTypeEnum: FileTypeEnum,
|
FileTypeEnum: FileTypeEnum,
|
||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
Name: '',
|
Name: "",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'ExportTemplate',
|
name: "ExportTemplate",
|
||||||
components: { BaseContainer, Pagination, TemplateForm },
|
components: { BaseContainer, Pagination, TemplateForm },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -167,73 +189,86 @@ export default {
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
currentRow: {},
|
currentRow: {},
|
||||||
editDialog: { title: '', visible: false },
|
editDialog: { title: "", visible: false },
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('确定删除该模版?').then(() => {
|
this.$confirm(
|
||||||
|
this.$t("dictionary:attachment:export:confirm:delete")
|
||||||
|
).then(() => {
|
||||||
deleteCommonDocument(row.Id).then(() => {
|
deleteCommonDocument(row.Id).then(() => {
|
||||||
this.$message.success('删除成功')
|
this.$message.success(this.$t("common:message:deletedSuccessfully"));
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getCommonDocumentList(this.searchData).then(res => {
|
getCommonDocumentList(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.total = res.Result.TotalCount;
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.editDialog.title = 'Add'
|
this.editDialog.title = "Add";
|
||||||
this.currentRow = { FileTypeEnum: FileTypeEnum }
|
this.currentRow = { FileTypeEnum: FileTypeEnum };
|
||||||
this.editDialog.visible = true
|
this.editDialog.visible = true;
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
handleDownload(row) {
|
handleDownload(row) {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
DownloadCommonDoc(row.Code).then(data => {
|
DownloadCommonDoc(row.Code)
|
||||||
this.loading = false
|
.then((data) => {
|
||||||
}).catch(() => { this.loading = false })
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.editDialog.title = 'Edit'
|
this.editDialog.title = "Edit";
|
||||||
this.currentRow = { ...row }
|
this.currentRow = { ...row };
|
||||||
this.editDialog.visible = true
|
this.editDialog.visible = true;
|
||||||
},
|
},
|
||||||
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();
|
||||||
},
|
},
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editDialog.visible = false
|
this.editDialog.visible = false;
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
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>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .search{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -59,9 +59,14 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="IsSystemLevel < 2">
|
||||||
<el-form-item label="收件人" prop="ToUserTypeList">
|
<el-form-item label="收件人" prop="ToUserTypeList">
|
||||||
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
|
<el-select
|
||||||
|
v-model="form.ToUserTypeList"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
class="mr"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.UserType"
|
v-for="item of $d.UserType"
|
||||||
:key="`ToUserTypeList${item.label}`"
|
:key="`ToUserTypeList${item.label}`"
|
||||||
|
@ -71,9 +76,14 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
||||||
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
|
<el-select
|
||||||
|
v-model="form.CopyUserTypeList"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
class="mr"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.UserType"
|
v-for="item of $d.UserType"
|
||||||
:key="`CopyUserTypeList${item.label}`"
|
:key="`CopyUserTypeList${item.label}`"
|
||||||
|
@ -83,9 +93,18 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
||||||
<el-select v-model="form.EmailUrgentEnum" @change="(v) => {v === 1 ? form.EmailCron = null : null}" clearable class="mr">
|
<el-select
|
||||||
|
v-model="form.EmailUrgentEnum"
|
||||||
|
@change="
|
||||||
|
(v) => {
|
||||||
|
v === 1 ? (form.EmailCron = null) : null;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
clearable
|
||||||
|
class="mr"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.EmailUrgent"
|
v-for="item of $d.EmailUrgent"
|
||||||
:key="`EmailUrgent${item.label}`"
|
:key="`EmailUrgent${item.label}`"
|
||||||
|
@ -95,13 +114,17 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="发送周期和时间" v-if="form.EmailUrgentEnum !== 1" prop="EmailCron">
|
<el-form-item
|
||||||
|
label="发送周期和时间"
|
||||||
|
v-if="form.EmailUrgentEnum !== 1"
|
||||||
|
prop="EmailCron"
|
||||||
|
>
|
||||||
<el-input style="width: 300px" readonly v-model="form.EmailCron" />
|
<el-input style="width: 300px" readonly v-model="form.EmailCron" />
|
||||||
<el-button type="primary" @click="showDialog">生成 cron</el-button>
|
<el-button type="primary" @click="showDialog">生成 cron</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
||||||
<el-radio-group v-model="form.IsReturnRequired">
|
<el-radio-group v-model="form.IsReturnRequired">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
|
@ -109,7 +132,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
||||||
<el-radio-group v-model="form.IsAutoSend">
|
<el-radio-group v-model="form.IsAutoSend">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
|
@ -117,18 +140,27 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
||||||
<el-radio-group v-model="form.IsDistinguishCriteria" @change="() => {form.CriterionTypeEnum = null}">
|
<el-radio-group
|
||||||
|
v-model="form.IsDistinguishCriteria"
|
||||||
|
@change="
|
||||||
|
() => {
|
||||||
|
form.CriterionTypeEnum = null;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
<el-radio :label="false">否</el-radio>
|
<el-radio :label="false">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:auditRecord:table:criterion')"
|
:label="$t('trials:auditRecord:table:criterion')"
|
||||||
v-if="form.IsDistinguishCriteria" prop="CriterionTypeEnum">
|
v-if="form.IsDistinguishCriteria"
|
||||||
|
prop="CriterionTypeEnum"
|
||||||
|
>
|
||||||
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
|
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.CriterionType"
|
v-for="item of $d.CriterionType"
|
||||||
|
@ -139,7 +171,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="是否启用" prop="IsEnable">
|
<el-form-item label="是否启用" prop="IsEnable">
|
||||||
<el-radio-group v-model="form.IsEnable">
|
<el-radio-group v-model="form.IsEnable">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
|
@ -147,7 +179,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="附件(CN)" prop="IsEnable">
|
<el-form-item label="附件(CN)" prop="IsEnable">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
|
@ -160,11 +192,16 @@
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:file-list="fileListCN"
|
:file-list="fileListCN"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">{{$t('common:button:upload')}}</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="fileListCN.length > 0"
|
||||||
|
>{{ $t("common:button:upload") }}</el-button
|
||||||
|
>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if='!IsSystemLevel'>
|
<el-col :span="12" v-if="!IsSystemLevel">
|
||||||
<el-form-item label="附件(EN)" prop="IsEnable">
|
<el-form-item label="附件(EN)" prop="IsEnable">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
|
@ -177,7 +214,12 @@
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:file-list="fileListEN"
|
:file-list="fileListEN"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">{{$t('common:button:upload')}}</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="fileListEN.length > 0"
|
||||||
|
>{{ $t("common:button:upload") }}</el-button
|
||||||
|
>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -186,194 +228,248 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.EmailHtmlContentCN"
|
v-model="form.EmailHtmlContentCN"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 8, maxRows: 8}"
|
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮件内容模版(EN)" prop="EmailHtmlContent">
|
<el-form-item label="邮件内容模版(EN)" prop="EmailHtmlContent">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.EmailHtmlContent"
|
v-model="form.EmailHtmlContent"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 8, maxRows: 8}"
|
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;padding-bottom: 10px">
|
<div
|
||||||
<el-form-item style="text-align:right;">
|
class="base-dialog-footer"
|
||||||
<el-button size="small" type="primary" @click="handleSave">Save</el-button>
|
style="text-align: right; margin-top: 10px; padding-bottom: 10px"
|
||||||
|
>
|
||||||
|
<el-form-item style="text-align: right">
|
||||||
|
<el-button size="small" type="primary" @click="handleSave"
|
||||||
|
>Save</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog append-to-body title="生成 cron" :visible.sync="showCron">
|
<el-dialog append-to-body title="生成 cron" :visible.sync="showCron">
|
||||||
<vcrontab :hideComponent="['year']" @hide="showCron=false" @fill="crontabFill" :expression="expression"></vcrontab>
|
<vcrontab
|
||||||
|
:hideComponent="['year']"
|
||||||
|
@hide="showCron = false"
|
||||||
|
@fill="crontabFill"
|
||||||
|
:expression="expression"
|
||||||
|
></vcrontab>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
import { Upload, addOrUpdateEmailNoticeConfigList } from "@/api/dictionary";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() { return {} }
|
|
||||||
},
|
|
||||||
IsSystemLevel:{
|
|
||||||
type: Boolean,
|
|
||||||
default() {
|
default() {
|
||||||
return false
|
return {};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
IsSystemLevel: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
expression: '',
|
expression: "",
|
||||||
showCron: false,
|
showCron: false,
|
||||||
form: {
|
form: {
|
||||||
Id: '',
|
Id: "",
|
||||||
Code: '',
|
Code: "",
|
||||||
EmailTopicCN: '',
|
EmailTopicCN: "",
|
||||||
EmailTopic: '',
|
EmailTopic: "",
|
||||||
BusinessLevelEnum: '',
|
BusinessLevelEnum: "",
|
||||||
BusinessModuleEnum: '',
|
BusinessModuleEnum: "",
|
||||||
ToUserTypeList: '',
|
ToUserTypeList: "",
|
||||||
CopyUserTypeList: '',
|
CopyUserTypeList: "",
|
||||||
EmailUrgentEnum: '',
|
EmailUrgentEnum: "",
|
||||||
EmailCron: '',
|
EmailCron: "",
|
||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
EmailHtmlContentCN: '',
|
EmailHtmlContentCN: "",
|
||||||
EmailHtmlContent: '',
|
EmailHtmlContent: "",
|
||||||
AttachPath: '',
|
AttachPath: "",
|
||||||
AttachName: '',
|
AttachName: "",
|
||||||
AttachNameCN: '',
|
AttachNameCN: "",
|
||||||
AttachCNPath: '',
|
AttachCNPath: "",
|
||||||
IsDistinguishCriteria: true,
|
IsDistinguishCriteria: true,
|
||||||
IsReturnRequired: true,
|
IsReturnRequired: true,
|
||||||
IsUrgent: true,
|
IsUrgent: true,
|
||||||
IsEnable: true,
|
IsEnable: true,
|
||||||
IsAutoSend: true,
|
IsAutoSend: true,
|
||||||
CriterionTypeEnum: null
|
CriterionTypeEnum: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
Code: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
Code: [{ required: true, message: "Please select", trigger: ["blur"] }],
|
||||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
BusinessScenarioEnum: [
|
||||||
EmailTopicCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
EmailTopic: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
],
|
||||||
BusinessLevelEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
EmailTopicCN: [
|
||||||
ToUserTypeList: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
EmailCron: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
],
|
||||||
EmailUrgentEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
EmailTopic: [
|
||||||
EmailHtmlContentCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
EmailHtmlContent: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
],
|
||||||
CriterionTypeEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
BusinessLevelEnum: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
ToUserTypeList: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
EmailCron: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
EmailUrgentEnum: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
EmailHtmlContentCN: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
EmailHtmlContent: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
|
CriterionTypeEnum: [
|
||||||
|
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
scenarioOption: [],
|
scenarioOption: [],
|
||||||
fileListCN: [],
|
fileListCN: [],
|
||||||
fileListEN: [],
|
fileListEN: [],
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initForm();
|
this.initForm();
|
||||||
if(this.IsSystemLevel){
|
if (this.IsSystemLevel) {
|
||||||
this.form.ToUserTypeList = [];
|
this.form.ToUserTypeList = [];
|
||||||
this.form.CopyUserTypeList = [];
|
this.form.CopyUserTypeList = [];
|
||||||
this.form.EmailUrgentEnum = '3';
|
this.form.EmailUrgentEnum = "3";
|
||||||
this.form.IsReturnRequired = false;
|
this.form.IsReturnRequired = false;
|
||||||
this.form.IsDistinguishCriteria = false;
|
this.form.IsDistinguishCriteria = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDialog() {
|
showDialog() {
|
||||||
this.expression = this.form.EmailCron;//传入的 cron 表达式,可以反解析到 UI 上
|
this.expression = this.form.EmailCron; //传入的 cron 表达式,可以反解析到 UI 上
|
||||||
this.showCron = true;
|
this.showCron = true;
|
||||||
},
|
},
|
||||||
crontabFill(value) {
|
crontabFill(value) {
|
||||||
this.form.EmailCron = value;
|
this.form.EmailCron = value;
|
||||||
},
|
},
|
||||||
handleRemoveFileCN() {
|
handleRemoveFileCN() {
|
||||||
this.form.AttachNameCN = null
|
this.form.AttachNameCN = null;
|
||||||
this.form.AttachCNPath = null
|
this.form.AttachCNPath = null;
|
||||||
this.fileListCN = []
|
this.fileListCN = [];
|
||||||
},
|
},
|
||||||
beforeUploadCN() {
|
beforeUploadCN() {
|
||||||
if (this.fileListCN.length > 0) {
|
if (this.fileListCN.length > 0) {
|
||||||
this.$alert('最多只能传一个附件')
|
this.$alert("最多只能传一个附件");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePreviewCN(row, r2) {
|
handlePreviewCN(row, r2) {
|
||||||
if (row.fullPath) {
|
if (row.fullPath) {
|
||||||
window.open(row.fullPath, '_blank')
|
window.open(row.fullPath, "_blank");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUploadFileCN(param) {
|
handleUploadFileCN(param) {
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
const formData = new FormData()
|
const formData = new FormData();
|
||||||
formData.append('file', param.file)
|
formData.append("file", param.file);
|
||||||
this.form.AttachNameCN = param.file.name
|
this.form.AttachNameCN = param.file.name;
|
||||||
Upload(formData, 3).then(res => {
|
Upload(formData, 3).then((res) => {
|
||||||
this.form.AttachCNPath = res.Result.FilePath
|
this.form.AttachCNPath = res.Result.FilePath;
|
||||||
this.btnLoading = false
|
this.btnLoading = false;
|
||||||
this.fileListCN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
this.fileListCN.push({
|
||||||
})
|
name: param.file.name,
|
||||||
|
path: res.Result.FilePath,
|
||||||
|
fullPath: res.Result.FullFilePath,
|
||||||
|
url: res.Result.FilePath,
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleUploadFileEN(param) {
|
handleUploadFileEN(param) {
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
const formData = new FormData()
|
const formData = new FormData();
|
||||||
formData.append('file', param.file)
|
formData.append("file", param.file);
|
||||||
this.form.AttachName = param.file.name
|
this.form.AttachName = param.file.name;
|
||||||
Upload(formData, 3).then(res => {
|
Upload(formData, 3).then((res) => {
|
||||||
this.form.AttachPath = res.Result.FilePath
|
this.form.AttachPath = res.Result.FilePath;
|
||||||
this.btnLoading = false
|
this.btnLoading = false;
|
||||||
this.fileListEN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
this.fileListEN.push({
|
||||||
})
|
name: param.file.name,
|
||||||
|
path: res.Result.FilePath,
|
||||||
|
fullPath: res.Result.FullFilePath,
|
||||||
|
url: res.Result.FilePath,
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleRemoveFileEN() {
|
handleRemoveFileEN() {
|
||||||
this.form.AttachName = null
|
this.form.AttachName = null;
|
||||||
this.form.AttachPath = null
|
this.form.AttachPath = null;
|
||||||
this.fileListEN = []
|
this.fileListEN = [];
|
||||||
},
|
},
|
||||||
beforeUploadEN() {
|
beforeUploadEN() {
|
||||||
if (this.fileListEN.length > 0) {
|
if (this.fileListEN.length > 0) {
|
||||||
this.$alert('最多只能传一个附件')
|
this.$alert("最多只能传一个附件");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePreviewEN(row, r2) {
|
handlePreviewEN(row, r2) {
|
||||||
if (row.fullPath) {
|
if (row.fullPath) {
|
||||||
window.open(row.fullPath, '_blank')
|
window.open(row.fullPath, "_blank");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async initForm() {
|
async initForm() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
// await this.getScenarios()
|
// await this.getScenarios()
|
||||||
for (const k in this.form) {
|
for (const k in this.form) {
|
||||||
if (this.data.hasOwnProperty(k)) {
|
if (this.data.hasOwnProperty(k)) {
|
||||||
this.form[k] = this.data[k]
|
this.form[k] = this.data[k];
|
||||||
}
|
}
|
||||||
if (k === 'AttachPath' && this.form[k]) {
|
if (k === "AttachPath" && this.form[k]) {
|
||||||
this.fileListEN.push({ name: this.data.AttachName, path: this.data.AttachPath, fullPath: this.data.AttachPath, url: this.data.AttachPath })
|
this.fileListEN.push({
|
||||||
|
name: this.data.AttachName,
|
||||||
|
path: this.data.AttachPath,
|
||||||
|
fullPath: this.data.AttachPath,
|
||||||
|
url: this.data.AttachPath,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (k === 'AttachCNPath' && this.form[k]) {
|
if (k === "AttachCNPath" && this.form[k]) {
|
||||||
this.fileListCN.push({ name: this.data.AttachNameCN, path: this.data.AttachCNPath, fullPath: this.data.AttachCNPath, url: this.data.AttachCNPath })
|
this.fileListCN.push({
|
||||||
|
name: this.data.AttachNameCN,
|
||||||
|
path: this.data.AttachCNPath,
|
||||||
|
fullPath: this.data.AttachCNPath,
|
||||||
|
url: this.data.AttachCNPath,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.emailForm.validate(valid => {
|
this.$refs.emailForm.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return;
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
this.form.IsSystemLevel = this.IsSystemLevel;
|
this.form.IsSystemLevel = this.IsSystemLevel;
|
||||||
addOrUpdateEmailNoticeConfigList(this.form).then(res => {
|
addOrUpdateEmailNoticeConfigList(this.form)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.$emit('closeDialog')
|
this.loading = false;
|
||||||
this.$emit('getList')
|
this.$emit("closeDialog");
|
||||||
this.$message.success('Saved successfully')
|
this.$emit("getList");
|
||||||
}).catch(() => {
|
this.$message.success("Saved successfully");
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
})
|
this.loading = false;
|
||||||
}
|
});
|
||||||
}
|
});
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,25 +1,69 @@
|
||||||
<template>
|
<template>
|
||||||
<box-content>
|
<box-content>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form v-if="!IsSystemLevel" :inline="true" size="mini" class="base-search-form">
|
<el-form
|
||||||
|
v-if="!IsSystemLevel"
|
||||||
|
:inline="true"
|
||||||
|
size="mini"
|
||||||
|
class="base-search-form"
|
||||||
|
>
|
||||||
<el-form-item label="是否需要回执:">
|
<el-form-item label="是否需要回执:">
|
||||||
<el-select v-model="searchData.IsReturnRequired" clearable style="width:100px;">
|
<el-select
|
||||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" :key="item.id"/>
|
v-model="searchData.IsReturnRequired"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.YesOrNo"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否加急:">
|
<el-form-item label="是否加急:">
|
||||||
<el-select v-model="searchData.IsUrgent" clearable style="width:100px;">
|
<el-select
|
||||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" :key="item.id"/>
|
v-model="searchData.IsUrgent"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.YesOrNo"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用:">
|
<el-form-item label="是否启用:">
|
||||||
<el-select v-model="searchData.IsEnable" clearable style="width:100px;">
|
<el-select
|
||||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" :key="item.id"/>
|
v-model="searchData.IsEnable"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.YesOrNo"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="isDistinguishCriteria">
|
<el-form-item
|
||||||
<el-select v-model="searchData.CriterionTypeEnum" clearable style="width:100px;">
|
:label="$t('trials:auditRecord:table:criterion')"
|
||||||
<el-option v-for="item of $d.CriterionType" :value="item.value" :label="item.label" :key="item.id"/>
|
v-if="isDistinguishCriteria"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.CriterionTypeEnum"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.CriterionType"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -27,31 +71,26 @@
|
||||||
<el-button type="primary" @click="handleReset">重置</el-button>
|
<el-button type="primary" @click="handleReset">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span style="margin-left:auto;">
|
<span style="margin-left: auto">
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
>
|
||||||
场景配置
|
场景配置
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<el-button
|
<el-button type="primary" size="mini" @click="handleAdd">
|
||||||
type="primary"
|
新增
|
||||||
size="mini"
|
</el-button>
|
||||||
@click="handleAdd"
|
</span>
|
||||||
>
|
|
||||||
新增
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 受试者列表 -->
|
<!-- 受试者列表 -->
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{bottomOffset:45}"
|
v-adaptive="{ bottomOffset: 45 }"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
height="100"
|
height="100"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
@sort-change="handleSortByColumn"
|
@sort-change="handleSortByColumn"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="40" />
|
<el-table-column type="index" width="40" />
|
||||||
|
@ -72,7 +111,7 @@
|
||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
|
{{ $fd("CriterionType", scope.row.CriterionTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -94,9 +133,10 @@
|
||||||
label="业务层级"
|
label="业务层级"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="100">
|
min-width="100"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('BusinessLevel',scope.row.BusinessLevelEnum) }}
|
{{ $fd("BusinessLevel", scope.row.BusinessLevelEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -104,9 +144,10 @@
|
||||||
label="业务模块"
|
label="业务模块"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="100">
|
min-width="100"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('BusinessModule',scope.row.BusinessModuleEnum) }}
|
{{ $fd("BusinessModule", scope.row.BusinessModuleEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -117,7 +158,7 @@
|
||||||
min-width="130"
|
min-width="130"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('Email_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
{{ $fd("Email_BusinessScenario", scope.row.BusinessScenarioEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 收件人 -->
|
<!-- 收件人 -->
|
||||||
|
@ -126,10 +167,16 @@
|
||||||
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="100"
|
min-width="100"
|
||||||
v-if="!IsSystemLevel"
|
v-if="IsSystemLevel < 2"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.ToUserTypeList.length > 0?scope.row.ToUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
|
{{
|
||||||
|
scope.row.ToUserTypeList.length > 0
|
||||||
|
? scope.row.ToUserTypeList.map((v) => $fd("UserType", v)).join(
|
||||||
|
"、"
|
||||||
|
)
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 抄送人 -->
|
<!-- 抄送人 -->
|
||||||
|
@ -141,7 +188,13 @@
|
||||||
v-if="!IsSystemLevel"
|
v-if="!IsSystemLevel"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.CopyUserTypeList.length > 0?scope.row.CopyUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
|
{{
|
||||||
|
scope.row.CopyUserTypeList.length > 0
|
||||||
|
? scope.row.CopyUserTypeList.map((v) => $fd("UserType", v)).join(
|
||||||
|
"、"
|
||||||
|
)
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -153,7 +206,7 @@
|
||||||
v-if="!IsSystemLevel"
|
v-if="!IsSystemLevel"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('EmailUrgent',scope.row.EmailUrgentEnum) }}
|
{{ $fd("EmailUrgent", scope.row.EmailUrgentEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -173,7 +226,11 @@
|
||||||
v-if="!IsSystemLevel"
|
v-if="!IsSystemLevel"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.FilePath" type="text" @click="handlePreview(scope.row.FilePath)">
|
<el-button
|
||||||
|
v-if="scope.row.FilePath"
|
||||||
|
type="text"
|
||||||
|
@click="handlePreview(scope.row.FilePath)"
|
||||||
|
>
|
||||||
{{ scope.row.FileName }}
|
{{ scope.row.FileName }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -189,9 +246,11 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
|
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
|
||||||
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
|
{{ $fd("YesOrNo", scope.row.IsReturnRequired) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}</el-tag>
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd("YesOrNo", scope.row.IsReturnRequired)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 是否自动发送 -->
|
<!-- 是否自动发送 -->
|
||||||
|
@ -205,9 +264,11 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsAutoSend" type="danger">
|
<el-tag v-if="scope.row.IsAutoSend" type="danger">
|
||||||
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
|
{{ $fd("YesOrNo", scope.row.IsAutoSend) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsAutoSend) }}</el-tag>
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd("YesOrNo", scope.row.IsAutoSend)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -220,9 +281,11 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsEnable" type="danger">
|
<el-tag v-if="scope.row.IsEnable" type="danger">
|
||||||
{{ $fd('YesOrNo', scope.row.IsEnable) }}
|
{{ $fd("YesOrNo", scope.row.IsEnable) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsEnable) }}</el-tag>
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd("YesOrNo", scope.row.IsEnable)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 更新时间 -->
|
<!-- 更新时间 -->
|
||||||
|
@ -243,20 +306,24 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="Action" min-width="140" fixed="right">
|
<el-table-column label="Action" min-width="140" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="handleEdit(scope.row)">
|
||||||
type="text"
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button type="text" @click="handleDelete(scope.row)"
|
||||||
|
>删除</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"
|
||||||
|
/>
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<!-- 修改受试者状态 -->
|
<!-- 修改受试者状态 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
@ -268,7 +335,12 @@
|
||||||
fullscreen
|
fullscreen
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
<EmailForm :data="rowData" :is-system-level="IsSystemLevel" @closeDialog="closeDialog" @getList="getList" />
|
<EmailForm
|
||||||
|
:data="rowData"
|
||||||
|
:is-system-level="IsSystemLevel"
|
||||||
|
@closeDialog="closeDialog"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 修改受试者状态 -->
|
<!-- 修改受试者状态 -->
|
||||||
|
@ -290,123 +362,128 @@
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
import {
|
||||||
import BoxContent from '@/components/BoxContent'
|
getEmailNoticeConfigList,
|
||||||
import Pagination from '@/components/Pagination'
|
deleteEmailNoticeConfig,
|
||||||
import EmailForm from './EmailForm'
|
} from "@/api/dictionary";
|
||||||
import AttachmentList from './AttachmentList'
|
import BoxContent from "@/components/BoxContent";
|
||||||
|
import Pagination from "@/components/Pagination";
|
||||||
|
import EmailForm from "./EmailForm";
|
||||||
|
import AttachmentList from "./AttachmentList";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
IsReturnRequired: '',
|
IsReturnRequired: "",
|
||||||
IsUrgent: '',
|
IsUrgent: "",
|
||||||
IsEnable: '',
|
IsEnable: "",
|
||||||
CriterionTypeEnum: null,
|
CriterionTypeEnum: null,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'EmailList',
|
name: "EmailList",
|
||||||
components: { BoxContent, Pagination, EmailForm, AttachmentList },
|
components: { BoxContent, Pagination, EmailForm, AttachmentList },
|
||||||
props: {
|
props: {
|
||||||
isDistinguishCriteria: {
|
isDistinguishCriteria: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return false
|
return false;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
IsSystemLevel:{
|
IsSystemLevel: {
|
||||||
type: Boolean,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
return false
|
return 0;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: '0',
|
activeTab: "0",
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
title: '',
|
title: "",
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
attachmentVisible: false
|
attachmentVisible: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取受试者列表
|
// 获取受试者列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
|
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
|
||||||
this.searchData.IsSystemLevel = this.IsSystemLevel;
|
this.searchData.IsSystemLevel = this.IsSystemLevel;
|
||||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
getEmailNoticeConfigList(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;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.rowData = {}
|
this.rowData = {};
|
||||||
this.title = '新增'
|
this.title = "新增";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = { ...row }
|
this.rowData = { ...row };
|
||||||
this.title = '编辑'
|
this.title = "编辑";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
})
|
}).then(() => {
|
||||||
.then(() => {
|
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||||
deleteEmailNoticeConfig(row.Id)
|
if (res.IsSuccess) {
|
||||||
.then(res => {
|
this.getList();
|
||||||
if (res.IsSuccess) {
|
this.$message.success("删除成功!");
|
||||||
this.getList()
|
}
|
||||||
this.$message.success('删除成功!')
|
});
|
||||||
}
|
});
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.rowData = { ...row }
|
this.rowData = { ...row };
|
||||||
this.attachmentVisible = true
|
this.attachmentVisible = true;
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
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();
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(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();
|
||||||
},
|
},
|
||||||
// 关闭新增、编辑框
|
// 关闭新增、编辑框
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editVisible = false
|
this.editVisible = false;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,129 +2,148 @@
|
||||||
<box-content>
|
<box-content>
|
||||||
<el-tabs v-model="activeTab" type="border-card">
|
<el-tabs v-model="activeTab" type="border-card">
|
||||||
<!-- 通用 -->
|
<!-- 通用 -->
|
||||||
<el-tab-pane
|
<el-tab-pane :label="$t('trials:emailManageCfg:title:commom')" name="0">
|
||||||
:label="$t('trials:emailManageCfg:title:commom')"
|
<EmailList
|
||||||
name="0"
|
v-if="activeTab === '0'"
|
||||||
>
|
:is-distinguish-criteria="false"
|
||||||
<EmailList v-if="activeTab === '0'" :is-distinguish-criteria="false" :is-system-level="false"></EmailList>
|
:is-system-level="0"
|
||||||
|
></EmailList>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 标准相关 -->
|
<!-- 标准相关 -->
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="$t('trials:emailManageCfg:title:criterions')"
|
:label="$t('trials:emailManageCfg:title:criterions')"
|
||||||
name="1"
|
name="1"
|
||||||
>
|
>
|
||||||
<EmailList v-if="activeTab === '1'" :is-distinguish-criteria="true" :is-system-level="false"></EmailList>
|
<EmailList
|
||||||
|
v-if="activeTab === '1'"
|
||||||
|
:is-distinguish-criteria="true"
|
||||||
|
:is-system-level="0"
|
||||||
|
></EmailList>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 标准相关 -->
|
<!-- 系统相关 -->
|
||||||
<el-tab-pane
|
<el-tab-pane :label="$t('trials:emailManageCfg:title:system')" name="2">
|
||||||
:label="$t('trials:emailManageCfg:title:system')"
|
<EmailList
|
||||||
name="2"
|
v-if="activeTab === '2'"
|
||||||
>
|
:is-distinguish-criteria="false"
|
||||||
<EmailList v-if="activeTab === '2'" :is-distinguish-criteria="false" :is-system-level="true"></EmailList>
|
:is-system-level="1"
|
||||||
|
></EmailList>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- 系统相关-分角色 -->
|
||||||
|
<el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
|
||||||
|
<EmailList
|
||||||
|
v-if="activeTab === '3'"
|
||||||
|
:is-distinguish-criteria="false"
|
||||||
|
:is-system-level="2"
|
||||||
|
></EmailList>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
import {
|
||||||
import BoxContent from '@/components/BoxContent'
|
getEmailNoticeConfigList,
|
||||||
import Pagination from '@/components/Pagination'
|
deleteEmailNoticeConfig,
|
||||||
import EmailList from './components/EmailList'
|
} from "@/api/dictionary";
|
||||||
|
import BoxContent from "@/components/BoxContent";
|
||||||
|
import Pagination from "@/components/Pagination";
|
||||||
|
import EmailList from "./components/EmailList";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
IsReturnRequired: '',
|
IsReturnRequired: "",
|
||||||
IsUrgent: '',
|
IsUrgent: "",
|
||||||
IsEnable: '',
|
IsEnable: "",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'EmailListIndex',
|
name: "EmailListIndex",
|
||||||
components: { BoxContent, Pagination, EmailList },
|
components: { BoxContent, Pagination, EmailList },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: '0',
|
activeTab: "0",
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
title: '',
|
title: "",
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
attachmentVisible: false
|
attachmentVisible: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取受试者列表
|
// 获取受试者列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
getEmailNoticeConfigList(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;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.rowData = {}
|
this.rowData = {};
|
||||||
this.title = '新增'
|
this.title = "新增";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = { ...row }
|
this.rowData = { ...row };
|
||||||
this.title = '编辑'
|
this.title = "编辑";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
})
|
}).then(() => {
|
||||||
.then(() => {
|
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||||
deleteEmailNoticeConfig(row.Id)
|
if (res.IsSuccess) {
|
||||||
.then(res => {
|
this.getList();
|
||||||
if (res.IsSuccess) {
|
this.$message.success("删除成功!");
|
||||||
this.getList()
|
}
|
||||||
this.$message.success('删除成功!')
|
});
|
||||||
}
|
});
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.rowData = { ...row }
|
this.rowData = { ...row };
|
||||||
this.attachmentVisible = true
|
this.attachmentVisible = true;
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
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();
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(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();
|
||||||
},
|
},
|
||||||
// 关闭新增、编辑框
|
// 关闭新增、编辑框
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editVisible = false
|
this.editVisible = false;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue