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
0dcee2c84b
|
@ -64,13 +64,13 @@
|
|||
{{ $t('passwordReset:button:verify') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="box-wrapper" v-if="active === 1">
|
||||
<div class="box-wrapper" v-show="active === 1">
|
||||
<el-form
|
||||
ref="resetForm"
|
||||
ref="resetForm2"
|
||||
v-loading="formLoading"
|
||||
:model="form"
|
||||
:label-width="$i18n.locale === 'en' ? '180px' : '100px'"
|
||||
:rules="rules"
|
||||
:rules="rules2"
|
||||
class="demo-ruleForm"
|
||||
size="small"
|
||||
>
|
||||
|
@ -213,6 +213,7 @@ export default {
|
|||
EmailOrPhone: '',
|
||||
VerificationCode: '',
|
||||
NewPwd: '',
|
||||
CheckPass: '',
|
||||
UserId: '',
|
||||
UserType: '',
|
||||
},
|
||||
|
@ -255,6 +256,29 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
rules2: {
|
||||
NewPwd: [
|
||||
{
|
||||
required: true,
|
||||
validator: this.$validatePassword,
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
CheckPass: [
|
||||
{
|
||||
required: true,
|
||||
validator: validatePass2,
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
UserId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
sendDisabled: true,
|
||||
sendTitle: this.$t('passwordReset:button:send'),
|
||||
formLoading: false,
|
||||
|
@ -262,7 +286,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
this.$refs['resetForm'].validate((valid) => {
|
||||
this.$refs['resetForm2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.formLoading = true
|
||||
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd))
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
style="width: 300px; height: 94px"
|
||||
/>
|
||||
</div>
|
||||
<div class="title" v-else>{{ $t("login:title:system") }}</div>
|
||||
<div class="title" v-else>{{ $t('login:title:system') }}</div>
|
||||
</div>
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
|
@ -112,7 +112,7 @@
|
|||
size="medium"
|
||||
@click.native.prevent="handleLogin"
|
||||
>
|
||||
{{ $t("login:button:login") }}
|
||||
{{ $t('login:button:login') }}
|
||||
</el-button>
|
||||
<div style="text-align: right">
|
||||
<TopLang
|
||||
|
@ -128,7 +128,7 @@
|
|||
@click.native.prevent="handleResetPwd"
|
||||
style="color: rgb(0, 147, 221)"
|
||||
>
|
||||
{{ $t("login:button:forgetPassword") }}
|
||||
{{ $t('login:button:forgetPassword') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
@ -181,10 +181,12 @@
|
|||
>
|
||||
<h1 style="text-align: center; margin-bottom: 20px">关于</h1>
|
||||
<p style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
|
||||
{{ $t("login:title:system_title") }}
|
||||
{{ $t('login:title:system_title') }}
|
||||
</p>
|
||||
<p style="margin-bottom: 20px" v-else>{{ $t('login:title:system') }}</p>
|
||||
<p style="margin-bottom: 20px">
|
||||
V{{ $Version.IsEnv_US ? $version.Version_US : $version.Version }}
|
||||
</p>
|
||||
<p style="margin-bottom: 20px" v-else>{{ $t("login:title:system") }}</p>
|
||||
<p style="margin-bottom: 20px">V{{ $version.Version }}</p>
|
||||
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
||||
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||
版权所有
|
||||
|
@ -208,14 +210,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import TopLang from "./topLang";
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import TopLang from './topLang'
|
||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||
import Vcode from "vue-puzzle-vcode";
|
||||
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
||||
import Img1 from "@/assets/pic-2.png";
|
||||
import Vcode from 'vue-puzzle-vcode'
|
||||
import browserTip from '@/views/dictionary/template/browser/tip.vue'
|
||||
import Img1 from '@/assets/pic-2.png'
|
||||
export default {
|
||||
name: "Login",
|
||||
name: 'Login',
|
||||
components: { TopLang, Vcode, browserTip },
|
||||
data() {
|
||||
return {
|
||||
|
@ -223,18 +225,18 @@ export default {
|
|||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||
aboutVisible: false,
|
||||
loginForm: {
|
||||
username: "",
|
||||
password: "",
|
||||
username: '',
|
||||
password: '',
|
||||
UserId: null,
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("login:formRule:userName"),
|
||||
trigger: "blur",
|
||||
message: this.$t('login:formRule:userName'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
||||
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||
],
|
||||
password: [
|
||||
// {
|
||||
|
@ -244,29 +246,29 @@ export default {
|
|||
// },
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("login:formRule:password"),
|
||||
trigger: "blur",
|
||||
message: this.$t('login:formRule:password'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
||||
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
passwordType: "password",
|
||||
passwordType: 'password',
|
||||
loginType: null,
|
||||
location: null,
|
||||
isShow: false,
|
||||
showCode: false,
|
||||
Img1,
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["asyncRoutes", "routes", "language"]),
|
||||
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||
},
|
||||
watch: {
|
||||
"$i18n.locale": {
|
||||
'$i18n.locale': {
|
||||
handler() {
|
||||
if (this.$refs.browserTip) {
|
||||
this.$refs.browserTip.open();
|
||||
this.$refs.browserTip.open()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
|
@ -274,88 +276,88 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loginType = this.$route.query.loginType;
|
||||
this.location = this.$route.query.location;
|
||||
zzSessionStorage.setItem("loginType", this.loginType);
|
||||
localStorage.setItem("location", this.location);
|
||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
||||
this.$i18n.locale = "en";
|
||||
this.setLanguage("en");
|
||||
this.$updateDictionary();
|
||||
this.loginType = this.$route.query.loginType
|
||||
this.location = this.$route.query.location
|
||||
zzSessionStorage.setItem('loginType', this.loginType)
|
||||
localStorage.setItem('location', this.location)
|
||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === 'oss-us-west-1') {
|
||||
this.$i18n.locale = 'en'
|
||||
this.setLanguage('en')
|
||||
this.$updateDictionary()
|
||||
} else {
|
||||
if (this.location === "USA" || this.NODE_ENV === "usa") {
|
||||
this.$i18n.locale = "en";
|
||||
this.setLanguage("en");
|
||||
this.$updateDictionary();
|
||||
if (this.location === 'USA' || this.NODE_ENV === 'usa') {
|
||||
this.$i18n.locale = 'en'
|
||||
this.setLanguage('en')
|
||||
this.$updateDictionary()
|
||||
} else {
|
||||
// this.$i18n.locale = 'zh'
|
||||
// this.setLanguage('zh')
|
||||
// this.$updateDictionary()
|
||||
}
|
||||
}
|
||||
this.$refs.browserTip.open();
|
||||
this.$refs.browserTip.open()
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
openAbout() {
|
||||
this.aboutVisible = true;
|
||||
this.aboutVisible = true
|
||||
},
|
||||
showPwd() {
|
||||
if (this.passwordType === "password") {
|
||||
this.passwordType = "";
|
||||
if (this.passwordType === 'password') {
|
||||
this.passwordType = ''
|
||||
} else {
|
||||
this.passwordType = "password";
|
||||
this.passwordType = 'password'
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus();
|
||||
});
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
handleLogin() {
|
||||
this.loginType = this.$route.query.loginType;
|
||||
this.loginType = this.$route.query.loginType
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.showCode) {
|
||||
this.isShow = true;
|
||||
this.isShow = true
|
||||
} else {
|
||||
this.onSuccess();
|
||||
this.onSuccess()
|
||||
}
|
||||
} else {
|
||||
// console.log('error submit!!')
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
loginIn(Id) {
|
||||
this.loading = true;
|
||||
this.showCode = false;
|
||||
if (Id) this.loginForm.UserId = Id;
|
||||
this.loading = true
|
||||
this.showCode = false
|
||||
if (Id) this.loginForm.UserId = Id
|
||||
this.$store
|
||||
.dispatch("user/login", this.loginForm)
|
||||
.dispatch('user/login', this.loginForm)
|
||||
.then((res) => {
|
||||
if (res.BasicInfo.IsFirstAdd) {
|
||||
// 当前用户为首次登录,请先修改密码之后再次登录
|
||||
this.$message.success(this.$t("login:message:login1"));
|
||||
this.$message.success(this.$t('login:message:login1'))
|
||||
setTimeout(() => {
|
||||
this.$router.push({
|
||||
path: `/recompose?userName=${this.loginForm.username}`,
|
||||
});
|
||||
}, 500);
|
||||
return;
|
||||
})
|
||||
}, 500)
|
||||
return
|
||||
} else if (res.BasicInfo.LoginState === 1) {
|
||||
// 请先修改密码后再登录!
|
||||
this.$alert(
|
||||
this.$t("login:message:login3"),
|
||||
this.$t("common:title:warning"),
|
||||
this.$t('login:message:login3'),
|
||||
this.$t('common:title:warning'),
|
||||
{
|
||||
callback: (action) => {
|
||||
this.$router.push({
|
||||
path: `/recompose?userName=${this.loginForm.username}`,
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
},
|
||||
}
|
||||
);
|
||||
return;
|
||||
)
|
||||
return
|
||||
} else if (res.IsMFA) {
|
||||
this.$MFA({
|
||||
UserId: res.BasicInfo.Id,
|
||||
|
@ -363,55 +365,55 @@ export default {
|
|||
username: this.loginForm.username,
|
||||
callBack: this.loginIn,
|
||||
cancelBack: () => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
},
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
} else if (res.BasicInfo.LoginState === 2) {
|
||||
// 本次登录的IP或设备与上次不一致,请确认'
|
||||
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
||||
this.$message.warning(this.$t("login:message:login4"));
|
||||
this.$message.warning(this.$t('login:message:login4'))
|
||||
}
|
||||
this.$store.dispatch("permission/generateRoutes").then((res) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('permission/generateRoutes').then((res) => {
|
||||
this.loading = false
|
||||
if (res && res.length > 0) {
|
||||
this.$store.dispatch("global/getNoticeList");
|
||||
this.$router.addRoutes(res);
|
||||
if (this.loginType === "DevOps") {
|
||||
this.$router.replace({ path: res[0].path });
|
||||
return;
|
||||
this.$store.dispatch('global/getNoticeList')
|
||||
this.$router.addRoutes(res)
|
||||
if (this.loginType === 'DevOps') {
|
||||
this.$router.replace({ path: res[0].path })
|
||||
return
|
||||
}
|
||||
if (this.hasPermi(["role:radmin"])) {
|
||||
this.$router.replace({ path: res[0].path });
|
||||
return;
|
||||
if (this.hasPermi(['role:radmin'])) {
|
||||
this.$router.replace({ path: res[0].path })
|
||||
return
|
||||
}
|
||||
if (
|
||||
this.hasPermi(["role:air", "role:rpm", "role:rcrc", "role:rir"])
|
||||
this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir'])
|
||||
) {
|
||||
this.$router.replace({ path: "/trials/trials-list" });
|
||||
this.$router.replace({ path: '/trials/trials-list' })
|
||||
} else {
|
||||
this.$router.replace({ path: "/trials" });
|
||||
this.$router.replace({ path: '/trials' })
|
||||
}
|
||||
} else {
|
||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||
this.$message.warning(this.$t("login:message:login2"));
|
||||
this.$message.warning(this.$t('login:message:login2'))
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.showCode = true;
|
||||
this.loading = false;
|
||||
});
|
||||
this.showCode = true
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
onSuccess() {
|
||||
this.isShow = false;
|
||||
this.loginIn();
|
||||
this.isShow = false
|
||||
this.loginIn()
|
||||
},
|
||||
handleResetPwd() {
|
||||
this.$router.push({ name: "Resetpassword" });
|
||||
this.$router.push({ name: 'Resetpassword' })
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -9,10 +9,16 @@
|
|||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="发布版本" prop="Version">
|
||||
<el-form-item :label="$t('system:log:form:version')" prop="Version">
|
||||
<el-input v-model="form.Version" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新功能" prop="UpdateContent">
|
||||
<el-form-item :label="$t('system:log:form:versionUS')" prop="Version">
|
||||
<el-input v-model="form.Version_US" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('system:log:form:updateContent')"
|
||||
prop="UpdateContent"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.UpdateContent"
|
||||
type="textarea"
|
||||
|
@ -20,8 +26,8 @@
|
|||
:autosize="{ minRows: 4, maxRows: 5 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布状态" prop="State">
|
||||
<el-select v-model="form.State" placeholder="请选择">
|
||||
<el-form-item :label="$t('system:log:form:State')" prop="State">
|
||||
<el-select v-model="form.State" placeholder="">
|
||||
<el-option
|
||||
v-for="item in $d.PublishStatus"
|
||||
:key="item.id"
|
||||
|
@ -31,15 +37,18 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期">
|
||||
<el-form-item :label="$t('system:log:form:PublishTime')">
|
||||
<el-date-picker
|
||||
v-model="form.PublishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否当前版本" prop="IsCurrentVersion">
|
||||
<el-select v-model="form.IsCurrentVersion" placeholder="请选择">
|
||||
<el-form-item
|
||||
:label="$t('system:log:form:IsCurrentVersion')"
|
||||
prop="IsCurrentVersion"
|
||||
>
|
||||
<el-select v-model="form.IsCurrentVersion" placeholder="">
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
|
@ -52,30 +61,31 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="handleCancle"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" @click="handleSave"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" @click="handleCancle">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdatePublishLog } from "@/api/admin";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
import { addOrUpdatePublishLog } from '@/api/admin'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
const formDataDefault = () => {
|
||||
return {
|
||||
Id: null,
|
||||
Version: null,
|
||||
Version_US: null,
|
||||
PublishTime: null,
|
||||
UpdateContent: null,
|
||||
State: null,
|
||||
IsCurrentVersion: null,
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "LogForm",
|
||||
name: 'LogForm',
|
||||
components: { BaseModel },
|
||||
data() {
|
||||
return {
|
||||
|
@ -83,69 +93,87 @@ export default {
|
|||
form: formDataDefault(),
|
||||
rules: {
|
||||
Version: [
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{ max: 50, message: `${this.$t("common:ruleMessage:maxLength")} 50` },
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` },
|
||||
],
|
||||
// PublishTime: [
|
||||
// { required: true, message: '请注明', trigger: 'blur' }
|
||||
// ],
|
||||
IsCurrentVersion: [
|
||||
{ required: true, message: "请选择", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
State: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
State: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||
UpdateContent: [
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
max: 1000,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
|
||||
message: `${this.$t('common:ruleMessage:maxLength')} 500`,
|
||||
},
|
||||
],
|
||||
},
|
||||
model_cfg: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "500px",
|
||||
title: "",
|
||||
width: '500px',
|
||||
title: '',
|
||||
appendToBody: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
openDialog(title, data) {
|
||||
this.model_cfg.visible = true;
|
||||
this.model_cfg.title = title;
|
||||
this.model_cfg.visible = true
|
||||
this.model_cfg.title = title
|
||||
if (Object.keys(data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (data.hasOwnProperty(k)) {
|
||||
this.form[k] = data[k];
|
||||
this.form[k] = data[k]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.form = formDataDefault();
|
||||
this.form = formDataDefault()
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.LogForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.loading = true;
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
addOrUpdatePublishLog(this.form)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
||||
this.model_cfg.visible = false;
|
||||
this.$emit("getList");
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleCancle() {
|
||||
this.model_cfg.visible = false;
|
||||
this.model_cfg.visible = false
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-select,
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
<div class="log">
|
||||
<div ref="leftContainer" class="left">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="发布版本" prop="Version">
|
||||
<el-form-item :label="$t('system:log:table:version')" prop="Version">
|
||||
<el-input v-model="searchData.Version" size="small" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:log:table:versionUS')" prop="Version">
|
||||
<el-input v-model="searchData.Version_US" size="small" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新功能" prop="UpdateContent">
|
||||
<el-input v-model="searchData.UpdateContent" size="small" clearable />
|
||||
</el-form-item>
|
||||
|
@ -38,30 +41,37 @@
|
|||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="发布版本"
|
||||
:label="$t('system:log:table:version')"
|
||||
prop="Version"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
label="更新功能"
|
||||
:label="$t('system:log:table:versionUS')"
|
||||
prop="Version_US"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('system:log:table:UpdateContent')"
|
||||
prop="UpdateContent"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="发布状态"
|
||||
:label="$t('system:log:table:State')"
|
||||
prop="State"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("PublishStatus", scope.row.State) }}</span>
|
||||
<span>{{ $fd('PublishStatus', scope.row.State) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发布日期"
|
||||
:label="$t('system:log:table:PublishTime')"
|
||||
prop="PublishTime"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
|
@ -70,23 +80,23 @@
|
|||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.PublishTime
|
||||
? moment(scope.row.PublishTime).format("YYYY-MM-DD")
|
||||
: ""
|
||||
? moment(scope.row.PublishTime).format('YYYY-MM-DD')
|
||||
: ''
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否当前版本"
|
||||
:label="$t('system:log:table:IsCurrentVersion')"
|
||||
prop="IsCurrentVersion"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("YesOrNo", scope.row.IsCurrentVersion) }}</span>
|
||||
<span>{{ $fd('YesOrNo', scope.row.IsCurrentVersion) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
prop=""
|
||||
min-width="200"
|
||||
|
@ -99,7 +109,7 @@
|
|||
icon="el-icon-edit-outline"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
|
@ -107,7 +117,7 @@
|
|||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -125,20 +135,21 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPublishLogList, deletePublishLog } from "@/api/admin";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import LogForm from "./components/LogForm.vue";
|
||||
import moment from "moment";
|
||||
import { getPublishLogList, deletePublishLog } from '@/api/admin'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import LogForm from './components/LogForm.vue'
|
||||
import moment from 'moment'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Version: null,
|
||||
Version_US: null,
|
||||
UpdateContent: null,
|
||||
Asc: false,
|
||||
SortField: "PublishTime",
|
||||
SortField: 'PublishTime',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: { Pagination, LogForm },
|
||||
data() {
|
||||
|
@ -148,74 +159,74 @@ export default {
|
|||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
getPublishLogList(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
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["LogForm"].openDialog("新增", {});
|
||||
});
|
||||
this.$refs['LogForm'].openDialog('新增', {})
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["LogForm"].openDialog("编辑", row);
|
||||
});
|
||||
this.$refs['LogForm'].openDialog('编辑', row)
|
||||
})
|
||||
},
|
||||
// 重置列表查询
|
||||
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
|
||||
deletePublishLog(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()
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.log {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="trial-myinfo-right-box">
|
||||
<div class="trial-myinfo-head">
|
||||
<!-- 修改密码 -->
|
||||
{{ $t("trials:trials-myinfo:title:updatePaasord") }}
|
||||
{{ $t('trials:trials-myinfo:title:updatePaasord') }}
|
||||
</div>
|
||||
<el-form
|
||||
ref="passwordForm"
|
||||
|
@ -52,17 +52,17 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" size="small" class="trial-info-btn" @click="save">
|
||||
{{ $t("trials:trials-myinfo:button:save") }}
|
||||
{{ $t('trials:trials-myinfo:button:save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import md5 from "js-md5";
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { modifyPassword } from "@/api/admin.js";
|
||||
import { removeToken } from "@/utils/auth";
|
||||
import md5 from 'js-md5'
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import { modifyPassword } from '@/api/admin.js'
|
||||
import { removeToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: "password",
|
||||
name: 'password',
|
||||
data() {
|
||||
return {
|
||||
password: {},
|
||||
|
@ -70,91 +70,96 @@ export default {
|
|||
OldPassWord: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
NewPassWord: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
trigger: 'blur',
|
||||
validator: this.$validatePassword,
|
||||
},
|
||||
],
|
||||
ConfirmPassWord: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
trigger: 'blur',
|
||||
validator: this.$validatePassword,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userId"]),
|
||||
...mapGetters(['userId']),
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.passwordForm.validate();
|
||||
if (!validate) return;
|
||||
let validate = await this.$refs.passwordForm.validate()
|
||||
if (!validate) return
|
||||
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
||||
this.$alert(this.$t("passwordReset:formRule:passwordsDiffer"));
|
||||
return;
|
||||
this.$alert(this.$t('passwordReset:formRule:passwordsDiffer'))
|
||||
return
|
||||
}
|
||||
let confirm = await this.$confirm(
|
||||
this.$t("trials:trials-myInfo:confirmMessage:updatePassWord"),
|
||||
this.$t('trials:trials-myInfo:confirmMessage:updatePassWord'),
|
||||
{
|
||||
type: "warning",
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: this.$t("common:button:confirm"),
|
||||
cancelButtonText: this.$t("common:button:cancel"),
|
||||
confirmButtonText: this.$t('common:button:confirm'),
|
||||
cancelButtonText: this.$t('common:button:cancel'),
|
||||
}
|
||||
);
|
||||
if (confirm !== "confirm") return;
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const param = {
|
||||
UserId: this.userId,
|
||||
NewPassWord: md5(this.password.NewPassWord),
|
||||
OldPassWord: md5(this.password.OldPassWord),
|
||||
};
|
||||
let res = await modifyPassword(param);
|
||||
}
|
||||
let res = await modifyPassword(param)
|
||||
if (res.IsSuccess) {
|
||||
// 修改成功,请重新登录账号
|
||||
this.$message.success(
|
||||
this.$t("trials:trials-myinfo:message:modifyPWSuccessfully")
|
||||
);
|
||||
removeToken();
|
||||
this.logout();
|
||||
this.$t('trials:trials-myinfo:message:modifyPWSuccessfully')
|
||||
)
|
||||
removeToken()
|
||||
this.logout()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async logout() {
|
||||
/* eslint-disable */
|
||||
var loginType = zzSessionStorage.getItem("loginType");
|
||||
await this.$store.dispatch("user/logout");
|
||||
var loginType = zzSessionStorage.getItem('loginType')
|
||||
await this.$store.dispatch('user/logout')
|
||||
if (loginType) {
|
||||
this.$router.push(`/login?loginType=${loginType}`);
|
||||
this.$router.push(`/login?loginType=${loginType}`)
|
||||
} else {
|
||||
this.$router.push(`/login`);
|
||||
this.$router.push(`/login`)
|
||||
}
|
||||
this.$i18n.locale = "zh";
|
||||
this.setLanguage("zh");
|
||||
this.$updateDictionary();
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-form-item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
|
@ -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,48 +70,54 @@ 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 => {
|
||||
var text
|
||||
if (this.$i18n.locale === 'zh') {
|
||||
text = res.Result.ValueCN
|
||||
} else {
|
||||
text = res.Result.Value
|
||||
}
|
||||
this.signText = text.replace('xxx', this.fileName)
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
getSystemBasicData(attachmentSignCode)
|
||||
.then((res) => {
|
||||
var text
|
||||
if (this.$i18n.locale === 'zh') {
|
||||
text = res.Result.ValueCN
|
||||
} else {
|
||||
text = res.Result.Value
|
||||
}
|
||||
this.signText = text.replace('xxx', this.fileName)
|
||||
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: '',
|
||||
},
|
||||
}
|
||||
userConfirm(params).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
// 签名成功!
|
||||
this.$message.success(this.$t('common:message:signSuccessfully'))
|
||||
this.$emit('closeDialog', true)
|
||||
}
|
||||
}).catch(() => { this.btnLoading = false })
|
||||
if (!this.isSystemDoc) {
|
||||
params.data.TrialId = this.trialId
|
||||
params.signInfo.TrialId = this.trialId
|
||||
}
|
||||
userConfirm(params)
|
||||
.then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
// 签名成功!
|
||||
this.$message.success(this.$t('common:message:signSuccessfully'))
|
||||
this.$emit('closeDialog', true)
|
||||
}
|
||||
})
|
||||
.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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue