版本管理新增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"
|
||||
/>
|
||||
</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">
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue