文件签署提交参数判断

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-23 11:39:29 +08:00
parent 80aa18eff2
commit 37e65339f3
2 changed files with 160 additions and 119 deletions

View File

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

View File

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