Compare commits

..

No commits in common. "b74337f2f0200f5cb4e9d8cd8eee75ebeee3dbcd" and "b4d4fffd71ab4ea52887c085927c4ecd826811ee" have entirely different histories.

2 changed files with 119 additions and 160 deletions

View File

@ -147,7 +147,7 @@
> >
{{ {{
$fd( $fd(
'InternationalizationType', "InternationalizationType",
scope.row.InternationalizationType scope.row.InternationalizationType
) )
}} }}
@ -158,7 +158,7 @@
> >
{{ {{
$fd( $fd(
'InternationalizationType', "InternationalizationType",
scope.row.InternationalizationType scope.row.InternationalizationType
) )
}} }}
@ -166,7 +166,7 @@
<el-tag v-else> <el-tag v-else>
{{ {{
$fd( $fd(
'InternationalizationType', "InternationalizationType",
scope.row.InternationalizationType scope.row.InternationalizationType
) )
}} }}
@ -176,7 +176,7 @@
<el-table-column <el-table-column
label="功能模块/服务名" label="功能模块/服务名"
prop="Module" prop="Module"
min-width="140" min-width="120"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
@ -210,13 +210,13 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="danger"> <el-tag v-if="scope.row.State === 0" type="danger">
{{ $fd('InternationalizationKeyState', scope.row.State) }} {{ $fd("InternationalizationKeyState", scope.row.State) }}
</el-tag> </el-tag>
<el-tag v-else-if="scope.row.State === 1" type="primary"> <el-tag v-else-if="scope.row.State === 1" type="primary">
{{ $fd('InternationalizationKeyState', scope.row.State) }} {{ $fd("InternationalizationKeyState", scope.row.State) }}
</el-tag> </el-tag>
<el-tag v-else> <el-tag v-else>
{{ $fd('InternationalizationKeyState', scope.row.State) }} {{ $fd("InternationalizationKeyState", scope.row.State) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -241,13 +241,7 @@
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column
label="创建时间"
prop="CreateTime"
width="150"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column <el-table-column
label="操作" label="操作"
fixed="right" fixed="right"
@ -295,11 +289,11 @@ import {
deleteInternationalization, deleteInternationalization,
getPublishVersionSelect, getPublishVersionSelect,
batchUpdateInternationalInfo, batchUpdateInternationalInfo,
} from '@/api/admin' } from "@/api/admin";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import I18nForm from './components/I18nForm.vue' import I18nForm from "./components/I18nForm.vue";
import BatchAddForm from './components/BatchAddForm.vue' import BatchAddForm from "./components/BatchAddForm.vue";
import moment from 'moment' import moment from "moment";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
Description: null, Description: null,
@ -310,13 +304,13 @@ const searchDataDefault = () => {
Module: null, Module: null,
PublishLogId: null, PublishLogId: null,
Asc: true, Asc: true,
SortField: '', SortField: "",
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
} };
} };
export default { export default {
name: 'I18n', name: "I18n",
components: { Pagination, I18nForm, BatchAddForm }, components: { Pagination, I18nForm, BatchAddForm },
data() { data() {
return { return {
@ -327,140 +321,140 @@ export default {
loading: false, loading: false,
PublishVersionList: [], PublishVersionList: [],
selectTableList: [], selectTableList: [],
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
this.getPublishVersionSelect() this.getPublishVersionSelect();
}, },
methods: { methods: {
// //
async getPublishVersionSelect() { async getPublishVersionSelect() {
try { try {
let res = await getPublishVersionSelect() let res = await getPublishVersionSelect();
if (res.IsSuccess) { if (res.IsSuccess) {
this.PublishVersionList = res.Result this.PublishVersionList = res.Result;
} }
} catch (err) { } catch (err) {
console.log(err) console.log(err);
} }
}, },
getList() { getList() {
this.loading = true this.loading = true;
getInternationalizationList(this.searchData) getInternationalizationList(this.searchData)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount this.total = res.Result.TotalCount;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
// //
handleBatchUpdate() { handleBatchUpdate() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['i18nForm'].openDialog( this.$refs["i18nForm"].openDialog(
'批量更新', "批量更新",
{}, {},
this.PublishVersionList, this.PublishVersionList,
'batch' "batch"
) );
}) });
}, },
async batch(row) { async batch(row) {
let { PublishLogId, State } = row let { PublishLogId, State } = row;
let data = { let data = {
PublishLogId, PublishLogId,
State, State,
IdList: this.selectTableList.map((item) => item.Id), IdList: this.selectTableList.map((item) => item.Id),
} };
try { try {
let res = await batchUpdateInternationalInfo(data) let res = await batchUpdateInternationalInfo(data);
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success(this.$t('common:message:updatedSuccessfully')) this.$message.success(this.$t("common:message:updatedSuccessfully"));
this.getList() this.getList();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['i18nForm'].handleCancle() this.$refs["i18nForm"].handleCancle();
}) });
} }
} catch (err) { } catch (err) {
console.log(err) console.log(err);
} }
}, },
handleAdd() { handleAdd() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['i18nForm'].openDialog( this.$refs["i18nForm"].openDialog(
'新增', "新增",
{}, {},
this.PublishVersionList, this.PublishVersionList,
'add' "add"
) );
}) });
}, },
handleBatchAdd() { handleBatchAdd() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['batcnAddForm'].openDialog( this.$refs["batcnAddForm"].openDialog(
'批量新增', "批量新增",
{}, {},
this.PublishVersionList this.PublishVersionList
) );
}) });
}, },
handleEdit(row) { handleEdit(row) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['i18nForm'].openDialog( this.$refs["i18nForm"].openDialog(
'编辑', "编辑",
row, row,
this.PublishVersionList, this.PublishVersionList,
'update' "update"
) );
}) });
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('是否确认删除?', { this.$confirm("是否确认删除?", {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}).then(() => { }).then(() => {
this.loading = true this.loading = true;
deleteInternationalization(row.Id) deleteInternationalization(row.Id)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList() this.getList();
this.$message.success( this.$message.success(
this.$t('common:message:deletedSuccessfully') this.$t("common:message:deletedSuccessfully")
) );
} }
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}) });
}, },
// //
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();
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
this.selectTableList = val this.selectTableList = val;
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.log { .log {

View File

@ -1,22 +1,19 @@
<template> <template>
<div v-loading="loading" class="sign-form-wrapper"> <div v-loading="loading" class="sign-form-wrapper">
<div class="sign-form-body"> <div class="sign-form-body">
<h4 v-if="signText" style="color: red">*{{ signText }}</h4> <h4 v-if="signText" style="color:red">*{{ signText }}</h4>
<el-form <el-form
ref="signForm" ref="signForm"
:model="signForm" :model="signForm"
size="small" size="small"
label-width="100px" label-width="100px"
> >
<el-form-item <el-form-item
:label="$t('common:form:sign:userName')" :label="$t('common:form:sign:userName')"
prop="UserName" prop="UserName"
:rules="[ :rules="[
{ { required: true, message: $t('common:ruleMessage:specify'), trigger: 'blur' }
required: true,
message: $t('common:ruleMessage:specify'),
trigger: 'blur',
},
]" ]"
> >
<el-input v-model="signForm.UserName" /> <el-input v-model="signForm.UserName" />
@ -25,36 +22,18 @@
:label="$t('common:form:sign:password')" :label="$t('common:form:sign:password')"
prop="Password" prop="Password"
:rules="[ :rules="[
{ { required: true, message: $t('common:ruleMessage:specify'), trigger: 'blur' }
required: true,
message: $t('common:ruleMessage:specify'),
trigger: 'blur',
},
]" ]"
> >
<el-input <el-input v-model="signForm.Password" show-password auto-complete="new-password" />
v-model="signForm.Password"
show-password
auto-complete="new-password"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer sign-form-footer"> <div slot="footer" class="dialog-footer sign-form-footer">
<el-button <el-button :disabled="btnLoading" size="small" type="primary" @click="handleclose">
:disabled="btnLoading"
size="small"
type="primary"
@click="handleclose"
>
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<el-button <el-button :loading="btnLoading" size="small" type="primary" @click="userConfirm">
:loading="btnLoading"
size="small"
type="primary"
@click="userConfirm"
>
{{ $t('common:button:sign') }} {{ $t('common:button:sign') }}
</el-button> </el-button>
</div> </div>
@ -70,54 +49,48 @@ export default {
props: { props: {
fileName: { fileName: {
type: String, type: String,
required: true, required: true
}, },
isSystemDoc: { isSystemDoc: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
documentId: { documentId: {
type: String, type: String,
required: true, required: true
}, },
trialId: { trialId: {
type: String, type: String,
default: '', default: ''
}, }
}, },
data() { data() {
return { return {
signForm: { signForm: {
UserName: '', UserName: '',
Password: '', Password: ''
}, },
signText: '', signText: '',
btnLoading: false, btnLoading: false,
loading: false, loading: false
} }
}, },
mounted() { mounted() {
this.loading = true this.loading = true
getSystemBasicData(attachmentSignCode) getSystemBasicData(attachmentSignCode).then(res => {
.then((res) => { var text
var text if (this.$i18n.locale === 'zh') {
if (this.$i18n.locale === 'zh') { text = res.Result.ValueCN
text = res.Result.ValueCN } else {
} else { text = res.Result.Value
text = res.Result.Value }
} this.signText = text.replace('xxx', this.fileName)
this.signText = text.replace('xxx', this.fileName) this.loading = false
this.loading = false }).catch(() => { this.loading = false })
})
.catch(() => {
this.loading = false
})
}, },
methods: { methods: {
userConfirm() { userConfirm() {
const currentUser = zzSessionStorage const currentUser = zzSessionStorage.getItem('userName').toLocaleLowerCase()
.getItem('userName')
.toLocaleLowerCase()
this.$refs.signForm.validate((valid) => { this.$refs.signForm.validate((valid) => {
console.log(valid) console.log(valid)
if (!valid) return if (!valid) return
@ -131,50 +104,42 @@ export default {
data: { data: {
// trialId: this.trialId, // trialId: this.trialId,
documentId: this.documentId, documentId: this.documentId,
isSystemDoc: this.isSystemDoc, isSystemDoc: this.isSystemDoc
}, },
signInfo: { signInfo: {
UserName: this.signForm.UserName, UserName: this.signForm.UserName,
PassWord: md5(this.signForm.Password), PassWord: md5(this.signForm.Password),
// c: this.trialId, // TrialId: this.trialId,
SignCode: '', SignCode: '',
SignText: this.signText, SignText: this.signText,
SignCodeId: '', SignCodeId: '',
SubjectVisitId: '', SubjectVisitId: ''
}, }
} }
if (this.isSystemDoc) { userConfirm(params).then(res => {
params.data.TrialId = this.trialId if (res.IsSuccess) {
params.signInfo.TrialId = this.trialId //
} this.$message.success(this.$t('common:message:signSuccessfully'))
userConfirm(params) this.$emit('closeDialog', true)
.then((res) => { }
if (res.IsSuccess) { }).catch(() => { this.btnLoading = false })
//
this.$message.success(this.$t('common:message:signSuccessfully'))
this.$emit('closeDialog', true)
}
})
.catch(() => {
this.btnLoading = false
})
}) })
}, },
handleclose() { handleclose() {
this.$emit('closeDialog', false) this.$emit('closeDialog', false)
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.sign-form-wrapper { .sign-form-wrapper{
.sign-form-body { .sign-form-body{
padding: 10px; padding:10px;
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
max-height: 650px; max-height:650px;
overflow-y: auto; overflow-y: auto;
} }
.sign-form-footer { .sign-form-footer{
margin-top: 10px; margin-top: 10px;
text-align: right; text-align: right;
} }