用户协议和数据隐私采集说明
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
62f601a7be
commit
19d472bfb3
|
|
@ -1428,9 +1428,26 @@ export function addOrUpdateUserAgreement(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 隐私政策和用户协议-删除
|
||||
export function deleteUserAgreement(id) {
|
||||
return request({
|
||||
url: `/UserAgreement/deleteUserAgreement/${id}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
// 隐私政策和用户协议-详情
|
||||
export function getUserAgreementById(data) {
|
||||
return request({
|
||||
url: `/UserAgreement/getUserAgreementById`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 隐私政策和用户协议-当前版本
|
||||
export function getCurrentVersionUserAgreements(data) {
|
||||
return request({
|
||||
url: `/UserAgreement/getCurrentVersionUserAgreements`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
import Vue from "vue";
|
||||
import AGRCOMP from "./index.vue";
|
||||
|
||||
const MFAConstructor = Vue.extend(AGRCOMP);
|
||||
let MFAINSTANCELIST = [];
|
||||
const AGR = options => {
|
||||
const { Id, callBack, cancelBack } = options;
|
||||
if (!Id) throw `Id is requred.but ${Id}`
|
||||
const id = `AGR${new Date().getTime()}`;
|
||||
const instance = new MFAConstructor();
|
||||
MFAINSTANCELIST.push(instance)
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
instance.vm.open({ Id });
|
||||
instance.vm.$on("success", (Id) => {
|
||||
if (callBack) callBack(Id)
|
||||
});
|
||||
instance.vm.$on("closed", () => {
|
||||
if (cancelBack) cancelBack();
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
let index = MFAINSTANCELIST.findIndex(item => item.id === id);
|
||||
MFAINSTANCELIST.splice(index, 1)
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
AGR.close = () => {
|
||||
if (MFAINSTANCELIST.length <= 0) return;
|
||||
MFAINSTANCELIST.forEach(item => {
|
||||
document.body.removeChild(item.vm.$el);
|
||||
item.vm.$destroy();
|
||||
})
|
||||
MFAINSTANCELIST = [];
|
||||
}
|
||||
export default AGR;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import AGRCOMP from "./index.vue";
|
||||
import AGR from "./fun";
|
||||
|
||||
export default Vue => {
|
||||
Vue.component(AGRCOMP.name, AGRCOMP);
|
||||
Vue.prototype.$AGR = AGR;
|
||||
};
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<template>
|
||||
<!--AGR-->
|
||||
<el-dialog v-if="visible" :visible.sync="visible" width="60%" :close-on-click-modal="false" append-to-body center
|
||||
:show-close="true" @close="cancel">
|
||||
<div slot="title">
|
||||
{{ agreement.FileName }}
|
||||
</div>
|
||||
<div v-html="agreement.FileContent"></div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getUserAgreementById
|
||||
} from '@/api/dictionary'
|
||||
export default {
|
||||
name: "AGR",
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
agreement: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getAgreement(Id) {
|
||||
try {
|
||||
let data = {
|
||||
Id
|
||||
}
|
||||
let res = await getUserAgreementById(data)
|
||||
if (res.IsSuccess) {
|
||||
this.agreement = res.Result
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
open(data) {
|
||||
let { Id } = data;
|
||||
this.getAgreement(Id)
|
||||
this.visible = true
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false;
|
||||
this.$emit("closed");
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -61,6 +61,8 @@ import Onlyoffice from '@/components/Preview_onlyoffice/index'
|
|||
Vue.use(Onlyoffice)
|
||||
import Video from '@/components/Preview_video/index'
|
||||
Vue.use(Video)
|
||||
import AGR from '@/components/AGR/index'
|
||||
Vue.use(AGR)
|
||||
import MFA from '@/components/MFA/index'
|
||||
Vue.use(MFA)
|
||||
import FB from '@/components/feedBack/index'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
<template>
|
||||
<el-form ref="sysAgreementFrom" v-loading="loading" :model="form" label-width="140px" size="small" :rules="rules"
|
||||
class="upload-temporary-file">
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item :label="$t('dictionary:agreement:table:UserAgreementTypeEnum')" prop="UserAgreementTypeEnum">
|
||||
<el-select v-model="form.UserAgreementTypeEnum" style="width: 50%" size="small" filterable>
|
||||
<el-option v-for="item of $d.UserAgreementType" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:agreement:table:FileName')" prop="FileName">
|
||||
<el-input v-model="form.FileName" clearable style="width: 50%" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:agreement:table:FileVersion')" prop="FileVersion">
|
||||
<el-input v-model="form.FileVersion" clearable style="width: 50%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('dictionary:agreement:table:FileContent')" prop="FileContent">
|
||||
<div class="html_temp">
|
||||
<prism-editor class="my-editor" v-model="form.FileContent" :highlight="highlighter" :line-numbers="true"
|
||||
style="width: 50%;max-height: 300px;"></prism-editor>
|
||||
<div v-html="form.FileContent" style="width: 45%;"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:agreement:table:UpdateDate')" prop="UpdateDate">
|
||||
<el-date-picker v-model="form.UpdateDate" type="datetime"
|
||||
:placeholder="$t('trials:seletctedReviews:table:selectionTime')" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss" clearable style="width: 50%;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:agreement:table:EffectiveDate')" prop="EffectiveDate">
|
||||
<el-date-picker v-model="form.EffectiveDate" type="datetime"
|
||||
:placeholder="$t('trials:seletctedReviews:table:selectionTime')" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss" clearable style="width: 50%;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" type="primary" :loading="saveBtnLoading" @click="handleSave">{{ $t('common:button:save')
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
addOrUpdateUserAgreement,
|
||||
} from '@/api/dictionary'
|
||||
|
||||
import { PrismEditor } from 'vue-prism-editor';
|
||||
import 'vue-prism-editor/dist/prismeditor.min.css';
|
||||
import { highlight, languages } from 'prismjs/components/prism-core';
|
||||
import 'prismjs/components/prism-clike';
|
||||
import 'prismjs/components/prism-javascript';
|
||||
import 'prismjs/themes/prism.css';
|
||||
export default {
|
||||
name: 'TemplateForm',
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
components: { PrismEditor },
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
UserAgreementTypeEnum: '',
|
||||
FileName: '',
|
||||
FileVersion: null,
|
||||
FileContent: '',
|
||||
UpdateDate: '',
|
||||
EffectiveDate: '',
|
||||
},
|
||||
rules: {
|
||||
UserAgreementTypeEnum: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||
],
|
||||
FileName: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] },
|
||||
],
|
||||
FileVersion: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] },
|
||||
],
|
||||
FileContent: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] },
|
||||
],
|
||||
UpdateDate: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||
],
|
||||
EffectiveDate: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||
],
|
||||
},
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
highlighter(code) {
|
||||
return highlight(code, languages.js);
|
||||
},
|
||||
async initForm() {
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.sysAgreementFrom.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateUserAgreement(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.html_temp {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
min-height: 300px;
|
||||
|
||||
.my-editor {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
<template>
|
||||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true" size="small">
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item :label="$t('dictionary:agreement:table:UserAgreementTypeEnum')">
|
||||
<el-select v-model="searchData.UserAgreementTypeEnum" style="width: 150px">
|
||||
<el-option v-for="item of $d.UserAgreementType" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 文件名称 -->
|
||||
<el-form-item :label="$t('dictionary:agreement:table:FileName')">
|
||||
<el-input v-model="searchData.FileName" style="width: 130px" clearable />
|
||||
</el-form-item>
|
||||
<!-- 版本 -->
|
||||
<el-form-item :label="$t('dictionary:agreement:table:FileVersion')">
|
||||
<el-input v-model="searchData.FileVersion" style="width: 130px" clearable />
|
||||
</el-form-item>
|
||||
<!--更新日期-->
|
||||
<el-form-item :label="$t('dictionary:agreement:table:UpdateDate')">
|
||||
<el-date-picker v-model="UpdateDate" @change="changeTimeList('UpdateDate')" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']" type="datetimerange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!--生效日期-->
|
||||
<el-form-item :label="$t('dictionary:agreement:table:EffectiveDate')">
|
||||
<el-date-picker v-model="EffectiveDate" @change="changeTimeList('EffectiveDate')"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" type="datetimerange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- 当前版本 -->
|
||||
<el-form-item :label="$t('dictionary:agreement:table:IsCurrentVersion')">
|
||||
<el-select v-model="searchData.IsCurrentVersion" style="width: 150px">
|
||||
<el-option v-for="item of $d.YesOrNo" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button type="primary" style="float: right" size="small" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
|
||||
@sort-change="handleSortChange">
|
||||
<el-table-column type="index" width="40" />
|
||||
<!-- 文件类型 -->
|
||||
<el-table-column prop="UserAgreementTypeEnum" :label="$t('dictionary:agreement:table:UserAgreementTypeEnum')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
$fd(
|
||||
'UserAgreementType',
|
||||
scope.row.UserAgreementTypeEnum
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 文件名称 -->
|
||||
<el-table-column prop="FileName" :label="$t('dictionary:agreement:table:FileName')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 版本 -->
|
||||
<el-table-column prop="FileVersion" :label="$t('dictionary:agreement:table:FileVersion')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!--内容-->
|
||||
<el-table-column prop="FileContent" :label="$t('dictionary:agreement:table:FileContent')">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click.stop="view(scope.row)">{{ $t('dictionary:agreement:button:view')
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 更新日期 -->
|
||||
<el-table-column prop="UpdateDate" :label="$t('dictionary:agreement:table:UpdateDate')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 生效日期 -->
|
||||
<el-table-column prop="EffectiveDate" :label="$t('dictionary:agreement:table:EffectiveDate')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 当前版本 -->
|
||||
<el-table-column prop="IsCurrentVersion" :label="$t('dictionary:agreement:table:IsCurrentVersion')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
$fd(
|
||||
'YesOrNo',
|
||||
scope.row.IsCurrentVersion
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 创建日期 -->
|
||||
<el-table-column prop="CreateTime" :label="$t('dictionary:agreement:table:CreateTime')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 修改日期 -->
|
||||
<el-table-column prop="UpdateTime" :label="$t('dictionary:agreement:table:UpdateTime')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
|
||||
<el-table-column :label="$t('common:action:action')" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" :disabled="scope.row.IsCurrentVersion" @click="setCurrentVersion(scope.row)">
|
||||
{{ $t('dictionary:agreement:button:setCurrentVersion') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog v-if="editDialog.visible" :visible.sync="editDialog.visible" :close-on-click-modal="false"
|
||||
:title="editDialog.title" custom-class="base-dialog-wrapper" :fullscreen="true">
|
||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getUserAgreementList,
|
||||
deleteUserAgreement,
|
||||
setCurrentVersion
|
||||
} from '@/api/dictionary'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import TemplateForm from './TemplateForm'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
StartEffectiveDate: null,
|
||||
EndEffectiveDate: null,
|
||||
FileName: null,
|
||||
FileVersion: null,
|
||||
IsCurrentVersion: null,
|
||||
StartUpdateDate: null,
|
||||
EndUpdateDate: null,
|
||||
UserAgreementTypeEnum: null,
|
||||
Asc: false,
|
||||
SortField: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'AgreementTemplate',
|
||||
components: { BaseContainer, Pagination, TemplateForm },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false,
|
||||
UpdateDate: [],
|
||||
EffectiveDate: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
computed: {
|
||||
isEN() {
|
||||
return this.$i18n.locale !== 'zh'
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async setCurrentVersion(row) {
|
||||
try {
|
||||
let data = {
|
||||
Id: row.Id
|
||||
}
|
||||
this.loading = true
|
||||
let res = await setCurrentVersion(data)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
view(row) {
|
||||
this.$AGR({
|
||||
Id: row.Id
|
||||
})
|
||||
},
|
||||
changeTimeList(key) {
|
||||
if (this[key]) {
|
||||
this.searchData[`Start${key}`] = this[key][0]
|
||||
this.searchData[`End${key}`] = this[key][1]
|
||||
} else {
|
||||
this.searchData.BeginCreateTime = null
|
||||
this.searchData.EndCreateTime = null
|
||||
}
|
||||
},
|
||||
handleDelete(row) {
|
||||
// 确定删除该模版?
|
||||
this.$confirm(this.$t('dictionary:agreement:message:msg1')).then(() => {
|
||||
deleteUserAgreement(row.Id).then(() => {
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
this.getList()
|
||||
})
|
||||
}).catch(() => { })
|
||||
},
|
||||
PreviewFile(row) {
|
||||
let basePath = window.location.origin
|
||||
if (window.location.protocol !== 'https:') {
|
||||
basePath = 'https://irc.test.extimaging.com'
|
||||
}
|
||||
let data = {
|
||||
name: row.NameCN,
|
||||
path: basePath + row.Path,
|
||||
}
|
||||
this.$emit('PreviewFile', data)
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
getUserAgreementList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.editDialog.title = this.$t('common:button:new')
|
||||
this.currentRow = {}
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
// 下载
|
||||
async handleDownload(row) {
|
||||
try {
|
||||
this.loading = true
|
||||
let fileName = this.isEN ? row.Name : row.NameCN;
|
||||
let type = fileName
|
||||
.substring(fileName.lastIndexOf('.'))
|
||||
.toLocaleLowerCase()
|
||||
if (!type) {
|
||||
let extendName = row.Path
|
||||
.substring(row.Path.lastIndexOf('.'))
|
||||
.toLocaleLowerCase()
|
||||
fileName += extendName
|
||||
}
|
||||
let res = await downLoadFile(this.OSSclientConfig.basePath + row.Path, fileName)
|
||||
this.loading = false
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.editDialog.title = this.$t('common:button:edit')
|
||||
this.currentRow = { ...row }
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
closeDialog() {
|
||||
this.editDialog.visible = false
|
||||
},
|
||||
// 排序
|
||||
handleSortChange(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .search {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<CommonTemplate v-if="activeTab === '4' && item.value == activeTab" />
|
||||
<SignatureTemplate v-if="activeTab === '5' && item.value == activeTab" />
|
||||
<ToolsTemplate v-if="activeTab === '0' && item.value == activeTab" />
|
||||
<AgreementTemplate v-if="activeTab === '6' && item.value == activeTab" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 预览 -->
|
||||
|
|
@ -28,6 +29,7 @@ import EmailTemplate from './components/EmailTemplate'
|
|||
import CommonTemplate from './components/CommonTemplate'
|
||||
import SignatureTemplate from './components/SignatureTemplate'
|
||||
import ToolsTemplate from './components/ToolsTemplate'
|
||||
import AgreementTemplate from './components/AgreementTemplate'
|
||||
import VueOfficeDocx from '@vue-office/docx'
|
||||
import '@vue-office/docx/lib/index.css'
|
||||
import VueOfficeExcel from '@vue-office/excel'
|
||||
|
|
@ -44,7 +46,8 @@ export default {
|
|||
VueOfficeDocx,
|
||||
VueOfficeExcel,
|
||||
PreviewFile,
|
||||
ToolsTemplate
|
||||
ToolsTemplate,
|
||||
AgreementTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,14 @@
|
|||
" size="medium" @click.native.prevent="handleLogin">
|
||||
{{ $t('login:button:login') }}
|
||||
</el-button>
|
||||
<div class="PrivacyPolicy" style="font-size: 14px;">
|
||||
<span>{{ $t('login:message:PrivacyPolicy') }}</span>
|
||||
<span style="cursor: pointer;color:#428bca" @click="viewAgreement(0)">{{ $t('login:message:UserAgreement')
|
||||
}}</span>
|
||||
<span>{{ $t('login:message:and') }}</span>
|
||||
<span style="cursor: pointer;color:#428bca" @click="viewAgreement(1)">{{
|
||||
$t('login:message:PrivacyPolicyName') }}</span>
|
||||
</div>
|
||||
<div style="text-align: right">
|
||||
<TopLang v-if="
|
||||
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' &&
|
||||
|
|
@ -94,10 +102,6 @@
|
|||
{{ $t('login:button:forgetPassword') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="PrivacyPolicy">
|
||||
<span>{{ $t('login:message:PrivacyPolicy') }}</span>
|
||||
<span style="cursor: pointer;color:#428bca">《{{ $t('login:message:PrivacyPolicyName') }}》</span>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -185,6 +189,9 @@ import Vcode from 'vue-puzzle-vcode'
|
|||
import browserTip from '@/views/dictionary/template/browser/tip.vue'
|
||||
import Img1 from '@/assets/pic-2.png'
|
||||
import toggleRole from '@/components/toggleRole'
|
||||
import {
|
||||
getCurrentVersionUserAgreements,
|
||||
} from '@/api/dictionary'
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: { TopLang, Vcode, browserTip, toggleRole },
|
||||
|
|
@ -232,6 +239,7 @@ export default {
|
|||
Img1,
|
||||
toggleRoleVisible: false,
|
||||
toggleRoleLoading: false,
|
||||
Agreement: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -260,7 +268,6 @@ export default {
|
|||
zzSessionStorage.setItem('loginType', this.loginType)
|
||||
localStorage.setItem('location', this.location)
|
||||
// zh-CN navigator.language
|
||||
console.log(navigator.language, 'navigator.language')
|
||||
if (navigator.language !== 'zh-CN' && navigator.language !== 'zh-TW') {
|
||||
this.$i18n.locale = 'en'
|
||||
this.setLanguage('en')
|
||||
|
|
@ -282,9 +289,29 @@ export default {
|
|||
}
|
||||
}
|
||||
this.$refs.browserTip.open()
|
||||
this.getAgreementList()
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
viewAgreement(type) {
|
||||
let find = this.Agreement.find(item => item.IsCurrentVersion && item.UserAgreementTypeEnum === type)
|
||||
if (!find) return this.$confirm(this.$t('login:message:noAgreement').replace('xxx', this.$fd('UserAgreementType', type)))
|
||||
this.$AGR({
|
||||
Id: find.Id
|
||||
})
|
||||
},
|
||||
getAgreementList() {
|
||||
getCurrentVersionUserAgreements({
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
IsCurrentVersion: true
|
||||
})
|
||||
.then((res) => {
|
||||
this.Agreement = res.Result
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
openAbout() {
|
||||
this.aboutVisible = true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,26 +2,18 @@
|
|||
<base-model v-if="config.visible" :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-table :data="curData" border style="width: 100%" size="small">
|
||||
<el-table-column
|
||||
prop="key"
|
||||
:label="$t('system:loginLog:table:cfgItem')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="value"
|
||||
:label="$t('system:loginLog:table:cfgVal')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="key" :label="$t('system:loginLog:table:cfgItem')" show-overflow-tooltip />
|
||||
<el-table-column prop="value" :label="$t('system:loginLog:table:cfgVal')" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.prop !== 'UserRoleList'">{{
|
||||
<el-button v-if="scope.row.prop === 'UserAgreementId'" type="text" size="small"
|
||||
@click.stop="view(scope.row)">{{
|
||||
$t('dictionary:agreement:button:view')
|
||||
}}</el-button>
|
||||
<span v-else-if="scope.row.prop !== 'UserRoleList'">{{
|
||||
scope.row.value
|
||||
}}</span>
|
||||
<template v-else>
|
||||
<div
|
||||
v-for="item in scope.row.value"
|
||||
:key="item.UserTypeEnum"
|
||||
style="margin: 0"
|
||||
>
|
||||
<div v-for="item in scope.row.value" :key="item.UserTypeEnum" style="margin: 0">
|
||||
{{ item.UserTypeShortName
|
||||
}}{{ $t('system:loginLog:form:symbol')
|
||||
}}{{ $fd('IsEnable', !item.IsUserRoleDisabled) }}
|
||||
|
|
@ -74,6 +66,9 @@ export default {
|
|||
'PositionName',
|
||||
'DepartmentName',
|
||||
'UserRoleList',
|
||||
'UserAgreementTypeEnum',
|
||||
'FileVersion',
|
||||
'UserAgreementId',
|
||||
],
|
||||
}
|
||||
},
|
||||
|
|
@ -96,12 +91,22 @@ export default {
|
|||
if (key === 'Status') {
|
||||
o.value = this.$fd('IsUserEnable', obj[key])
|
||||
}
|
||||
if (key === 'UserAgreementTypeEnum') {
|
||||
o.value = this.$fd('UserAgreementType', obj[key])
|
||||
}
|
||||
curData.push(o)
|
||||
}
|
||||
})
|
||||
return curData
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
view(row) {
|
||||
this.$AGR({
|
||||
Id: row.value
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue