版本管理新增LILI版本
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f17f1d6a6b
commit
692fd7bc97
|
@ -34,7 +34,7 @@
|
||||||
style="width: 300px; height: 94px"
|
style="width: 300px; height: 94px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="title" v-else>{{ $t("login:title:system") }}</div>
|
<div class="title" v-else>{{ $t('login:title:system') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
size="medium"
|
size="medium"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
{{ $t("login:button:login") }}
|
{{ $t('login:button:login') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<TopLang
|
<TopLang
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
@click.native.prevent="handleResetPwd"
|
@click.native.prevent="handleResetPwd"
|
||||||
style="color: rgb(0, 147, 221)"
|
style="color: rgb(0, 147, 221)"
|
||||||
>
|
>
|
||||||
{{ $t("login:button:forgetPassword") }}
|
{{ $t('login:button:forgetPassword') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -181,10 +181,12 @@
|
||||||
>
|
>
|
||||||
<h1 style="text-align: center; margin-bottom: 20px">关于</h1>
|
<h1 style="text-align: center; margin-bottom: 20px">关于</h1>
|
||||||
<p style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
|
<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>
|
||||||
<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'">
|
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
||||||
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||||
版权所有
|
版权所有
|
||||||
|
@ -208,14 +210,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations } from "vuex";
|
import { mapGetters, mapMutations } from 'vuex'
|
||||||
import TopLang from "./topLang";
|
import TopLang from './topLang'
|
||||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||||
import Vcode from "vue-puzzle-vcode";
|
import Vcode from 'vue-puzzle-vcode'
|
||||||
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
import browserTip from '@/views/dictionary/template/browser/tip.vue'
|
||||||
import Img1 from "@/assets/pic-2.png";
|
import Img1 from '@/assets/pic-2.png'
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: 'Login',
|
||||||
components: { TopLang, Vcode, browserTip },
|
components: { TopLang, Vcode, browserTip },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -223,18 +225,18 @@ export default {
|
||||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||||
aboutVisible: false,
|
aboutVisible: false,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: '',
|
||||||
password: "",
|
password: '',
|
||||||
UserId: null,
|
UserId: null,
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("login:formRule:userName"),
|
message: this.$t('login:formRule:userName'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
// {
|
// {
|
||||||
|
@ -244,29 +246,29 @@ export default {
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("login:formRule:password"),
|
message: this.$t('login:formRule:password'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
passwordType: "password",
|
passwordType: 'password',
|
||||||
loginType: null,
|
loginType: null,
|
||||||
location: null,
|
location: null,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
showCode: false,
|
showCode: false,
|
||||||
Img1,
|
Img1,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["asyncRoutes", "routes", "language"]),
|
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"$i18n.locale": {
|
'$i18n.locale': {
|
||||||
handler() {
|
handler() {
|
||||||
if (this.$refs.browserTip) {
|
if (this.$refs.browserTip) {
|
||||||
this.$refs.browserTip.open();
|
this.$refs.browserTip.open()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
@ -274,88 +276,88 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType
|
||||||
this.location = this.$route.query.location;
|
this.location = this.$route.query.location
|
||||||
zzSessionStorage.setItem("loginType", this.loginType);
|
zzSessionStorage.setItem('loginType', this.loginType)
|
||||||
localStorage.setItem("location", this.location);
|
localStorage.setItem('location', this.location)
|
||||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
if (process.env.VUE_APP_OSS_CONFIG_REGION === 'oss-us-west-1') {
|
||||||
this.$i18n.locale = "en";
|
this.$i18n.locale = 'en'
|
||||||
this.setLanguage("en");
|
this.setLanguage('en')
|
||||||
this.$updateDictionary();
|
this.$updateDictionary()
|
||||||
} else {
|
} else {
|
||||||
if (this.location === "USA" || this.NODE_ENV === "usa") {
|
if (this.location === 'USA' || this.NODE_ENV === 'usa') {
|
||||||
this.$i18n.locale = "en";
|
this.$i18n.locale = 'en'
|
||||||
this.setLanguage("en");
|
this.setLanguage('en')
|
||||||
this.$updateDictionary();
|
this.$updateDictionary()
|
||||||
} else {
|
} else {
|
||||||
// this.$i18n.locale = 'zh'
|
// this.$i18n.locale = 'zh'
|
||||||
// this.setLanguage('zh')
|
// this.setLanguage('zh')
|
||||||
// this.$updateDictionary()
|
// this.$updateDictionary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs.browserTip.open();
|
this.$refs.browserTip.open()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||||
openAbout() {
|
openAbout() {
|
||||||
this.aboutVisible = true;
|
this.aboutVisible = true
|
||||||
},
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === "password") {
|
if (this.passwordType === 'password') {
|
||||||
this.passwordType = "";
|
this.passwordType = ''
|
||||||
} else {
|
} else {
|
||||||
this.passwordType = "password";
|
this.passwordType = 'password'
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.password.focus();
|
this.$refs.password.focus()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType
|
||||||
this.$refs.loginForm.validate((valid) => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.showCode) {
|
if (this.showCode) {
|
||||||
this.isShow = true;
|
this.isShow = true
|
||||||
} else {
|
} else {
|
||||||
this.onSuccess();
|
this.onSuccess()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// console.log('error submit!!')
|
// console.log('error submit!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
loginIn(Id) {
|
loginIn(Id) {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.showCode = false;
|
this.showCode = false
|
||||||
if (Id) this.loginForm.UserId = Id;
|
if (Id) this.loginForm.UserId = Id
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("user/login", this.loginForm)
|
.dispatch('user/login', this.loginForm)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.BasicInfo.IsFirstAdd) {
|
if (res.BasicInfo.IsFirstAdd) {
|
||||||
// 当前用户为首次登录,请先修改密码之后再次登录
|
// 当前用户为首次登录,请先修改密码之后再次登录
|
||||||
this.$message.success(this.$t("login:message:login1"));
|
this.$message.success(this.$t('login:message:login1'))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `/recompose?userName=${this.loginForm.username}`,
|
path: `/recompose?userName=${this.loginForm.username}`,
|
||||||
});
|
})
|
||||||
}, 500);
|
}, 500)
|
||||||
return;
|
return
|
||||||
} else if (res.BasicInfo.LoginState === 1) {
|
} else if (res.BasicInfo.LoginState === 1) {
|
||||||
// 请先修改密码后再登录!
|
// 请先修改密码后再登录!
|
||||||
this.$alert(
|
this.$alert(
|
||||||
this.$t("login:message:login3"),
|
this.$t('login:message:login3'),
|
||||||
this.$t("common:title:warning"),
|
this.$t('common:title:warning'),
|
||||||
{
|
{
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `/recompose?userName=${this.loginForm.username}`,
|
path: `/recompose?userName=${this.loginForm.username}`,
|
||||||
});
|
})
|
||||||
return;
|
return
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
return;
|
return
|
||||||
} else if (res.IsMFA) {
|
} else if (res.IsMFA) {
|
||||||
this.$MFA({
|
this.$MFA({
|
||||||
UserId: res.BasicInfo.Id,
|
UserId: res.BasicInfo.Id,
|
||||||
|
@ -363,55 +365,55 @@ export default {
|
||||||
username: this.loginForm.username,
|
username: this.loginForm.username,
|
||||||
callBack: this.loginIn,
|
callBack: this.loginIn,
|
||||||
cancelBack: () => {
|
cancelBack: () => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
return;
|
return
|
||||||
} else if (res.BasicInfo.LoginState === 2) {
|
} else if (res.BasicInfo.LoginState === 2) {
|
||||||
// 本次登录的IP或设备与上次不一致,请确认'
|
// 本次登录的IP或设备与上次不一致,请确认'
|
||||||
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
// 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.$store.dispatch('permission/generateRoutes').then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
if (res && res.length > 0) {
|
if (res && res.length > 0) {
|
||||||
this.$store.dispatch("global/getNoticeList");
|
this.$store.dispatch('global/getNoticeList')
|
||||||
this.$router.addRoutes(res);
|
this.$router.addRoutes(res)
|
||||||
if (this.loginType === "DevOps") {
|
if (this.loginType === 'DevOps') {
|
||||||
this.$router.replace({ path: res[0].path });
|
this.$router.replace({ path: res[0].path })
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:radmin"])) {
|
if (this.hasPermi(['role:radmin'])) {
|
||||||
this.$router.replace({ path: res[0].path });
|
this.$router.replace({ path: res[0].path })
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (
|
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 {
|
} else {
|
||||||
this.$router.replace({ path: "/trials" });
|
this.$router.replace({ path: '/trials' })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||||
this.$message.warning(this.$t("login:message:login2"));
|
this.$message.warning(this.$t('login:message:login2'))
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.showCode = true;
|
this.showCode = true
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
onSuccess() {
|
onSuccess() {
|
||||||
this.isShow = false;
|
this.isShow = false
|
||||||
this.loginIn();
|
this.loginIn()
|
||||||
},
|
},
|
||||||
handleResetPwd() {
|
handleResetPwd() {
|
||||||
this.$router.push({ name: "Resetpassword" });
|
this.$router.push({ name: 'Resetpassword' })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -9,10 +9,16 @@
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
size="small"
|
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-input v-model="form.Version" />
|
||||||
</el-form-item>
|
</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
|
<el-input
|
||||||
v-model="form.UpdateContent"
|
v-model="form.UpdateContent"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@ -20,8 +26,8 @@
|
||||||
:autosize="{ minRows: 4, maxRows: 5 }"
|
:autosize="{ minRows: 4, maxRows: 5 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布状态" prop="State">
|
<el-form-item :label="$t('system:log:form:State')" prop="State">
|
||||||
<el-select v-model="form.State" placeholder="请选择">
|
<el-select v-model="form.State" placeholder="">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in $d.PublishStatus"
|
v-for="item in $d.PublishStatus"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -31,15 +37,18 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布日期">
|
<el-form-item :label="$t('system:log:form:PublishTime')">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.PublishTime"
|
v-model="form.PublishTime"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否当前版本" prop="IsCurrentVersion">
|
<el-form-item
|
||||||
<el-select v-model="form.IsCurrentVersion" placeholder="请选择">
|
:label="$t('system:log:form:IsCurrentVersion')"
|
||||||
|
prop="IsCurrentVersion"
|
||||||
|
>
|
||||||
|
<el-select v-model="form.IsCurrentVersion" placeholder="">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in $d.YesOrNo"
|
v-for="item in $d.YesOrNo"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -52,30 +61,31 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button size="small" type="primary" @click="handleCancle"
|
<el-button size="small" type="primary" @click="handleCancle">
|
||||||
>取消</el-button
|
{{ $t('common:button:cancel') }}
|
||||||
>
|
</el-button>
|
||||||
<el-button size="small" type="primary" @click="handleSave"
|
<el-button size="small" type="primary" @click="handleSave">
|
||||||
>保存</el-button
|
{{ $t('common:button:save') }}
|
||||||
>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdatePublishLog } from "@/api/admin";
|
import { addOrUpdatePublishLog } from '@/api/admin'
|
||||||
import BaseModel from "@/components/BaseModel";
|
import BaseModel from '@/components/BaseModel'
|
||||||
const formDataDefault = () => {
|
const formDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Id: null,
|
Id: null,
|
||||||
Version: null,
|
Version: null,
|
||||||
|
Version_US: null,
|
||||||
PublishTime: null,
|
PublishTime: null,
|
||||||
UpdateContent: null,
|
UpdateContent: null,
|
||||||
State: null,
|
State: null,
|
||||||
IsCurrentVersion: null,
|
IsCurrentVersion: null,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "LogForm",
|
name: 'LogForm',
|
||||||
components: { BaseModel },
|
components: { BaseModel },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -83,69 +93,87 @@ export default {
|
||||||
form: formDataDefault(),
|
form: formDataDefault(),
|
||||||
rules: {
|
rules: {
|
||||||
Version: [
|
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: [
|
// PublishTime: [
|
||||||
// { required: true, message: '请注明', trigger: 'blur' }
|
// { required: true, message: '请注明', trigger: 'blur' }
|
||||||
// ],
|
// ],
|
||||||
IsCurrentVersion: [
|
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: [
|
UpdateContent: [
|
||||||
{ required: true, message: "请注明", trigger: "blur" },
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
max: 1000,
|
max: 1000,
|
||||||
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
|
message: `${this.$t('common:ruleMessage:maxLength')} 500`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
model_cfg: {
|
model_cfg: {
|
||||||
visible: false,
|
visible: false,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
width: "500px",
|
width: '500px',
|
||||||
title: "",
|
title: '',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
openDialog(title, data) {
|
openDialog(title, data) {
|
||||||
this.model_cfg.visible = true;
|
this.model_cfg.visible = true
|
||||||
this.model_cfg.title = title;
|
this.model_cfg.title = title
|
||||||
if (Object.keys(data).length > 0) {
|
if (Object.keys(data).length > 0) {
|
||||||
for (const k in this.form) {
|
for (const k in this.form) {
|
||||||
if (data.hasOwnProperty(k)) {
|
if (data.hasOwnProperty(k)) {
|
||||||
this.form[k] = data[k];
|
this.form[k] = data[k]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.form = formDataDefault();
|
this.form = formDataDefault()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.LogForm.validate((valid) => {
|
this.$refs.LogForm.validate((valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
addOrUpdatePublishLog(this.form)
|
addOrUpdatePublishLog(this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.model_cfg.visible = false;
|
this.model_cfg.visible = false
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleCancle() {
|
handleCancle() {
|
||||||
this.model_cfg.visible = false;
|
this.model_cfg.visible = false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .el-select,
|
::v-deep .el-select,
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
<div class="log">
|
<div class="log">
|
||||||
<div ref="leftContainer" class="left">
|
<div ref="leftContainer" class="left">
|
||||||
<el-form :inline="true">
|
<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-input v-model="searchData.Version" size="small" clearable />
|
||||||
</el-form-item>
|
</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-form-item label="更新功能" prop="UpdateContent">
|
||||||
<el-input v-model="searchData.UpdateContent" size="small" clearable />
|
<el-input v-model="searchData.UpdateContent" size="small" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -38,30 +41,37 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="发布版本"
|
:label="$t('system:log:table:version')"
|
||||||
prop="Version"
|
prop="Version"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<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"
|
prop="UpdateContent"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="发布状态"
|
:label="$t('system:log:table:State')"
|
||||||
prop="State"
|
prop="State"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ $fd("PublishStatus", scope.row.State) }}</span>
|
<span>{{ $fd('PublishStatus', scope.row.State) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="发布日期"
|
:label="$t('system:log:table:PublishTime')"
|
||||||
prop="PublishTime"
|
prop="PublishTime"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
@ -70,23 +80,23 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.PublishTime
|
scope.row.PublishTime
|
||||||
? moment(scope.row.PublishTime).format("YYYY-MM-DD")
|
? moment(scope.row.PublishTime).format('YYYY-MM-DD')
|
||||||
: ""
|
: ''
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="是否当前版本"
|
:label="$t('system:log:table:IsCurrentVersion')"
|
||||||
prop="IsCurrentVersion"
|
prop="IsCurrentVersion"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ $fd("YesOrNo", scope.row.IsCurrentVersion) }}</span>
|
<span>{{ $fd('YesOrNo', scope.row.IsCurrentVersion) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
:label="$t('common:action:action')"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
prop=""
|
prop=""
|
||||||
min-width="200"
|
min-width="200"
|
||||||
|
@ -99,7 +109,7 @@
|
||||||
icon="el-icon-edit-outline"
|
icon="el-icon-edit-outline"
|
||||||
@click="handleEdit(scope.row)"
|
@click="handleEdit(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
{{ $t('common:button:edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -107,7 +117,7 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
{{ $t('common:button:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -125,20 +135,21 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getPublishLogList, deletePublishLog } from "@/api/admin";
|
import { getPublishLogList, deletePublishLog } from '@/api/admin'
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import LogForm from "./components/LogForm.vue";
|
import LogForm from './components/LogForm.vue'
|
||||||
import moment from "moment";
|
import moment from 'moment'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Version: null,
|
Version: null,
|
||||||
|
Version_US: null,
|
||||||
UpdateContent: null,
|
UpdateContent: null,
|
||||||
Asc: false,
|
Asc: false,
|
||||||
SortField: "PublishTime",
|
SortField: 'PublishTime',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination, LogForm },
|
components: { Pagination, LogForm },
|
||||||
data() {
|
data() {
|
||||||
|
@ -148,74 +159,74 @@ export default {
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getPublishLogList(this.searchData)
|
getPublishLogList(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
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["LogForm"].openDialog("新增", {});
|
this.$refs['LogForm'].openDialog('新增', {})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["LogForm"].openDialog("编辑", row);
|
this.$refs['LogForm'].openDialog('编辑', row)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 重置列表查询
|
// 重置列表查询
|
||||||
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
|
||||||
deletePublishLog(row.Id)
|
deletePublishLog(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()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.log {
|
.log {
|
||||||
|
|
Loading…
Reference in New Issue