fix(*): 更新launcher打包内容20250711
This commit is contained in:
@ -55,4 +55,10 @@
|
|||||||
|
|
||||||
根据Cooperop-Mix逻辑调整对应产品加载功能并优化重启处理逻辑
|
根据Cooperop-Mix逻辑调整对应产品加载功能并优化重启处理逻辑
|
||||||
|
|
||||||
|
2025-07-11
|
||||||
|
|
||||||
|
1. 调整授权产品查看界面(补充二维码)
|
||||||
|
2. 调整授权校验(注册表存在必要信息后仅校验运行目录即可)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
xin-launcher.zip
BIN
xin-launcher.zip
Binary file not shown.
Binary file not shown.
@ -165,6 +165,7 @@
|
|||||||
'token': sessionStorage.getItem("token")
|
'token': sessionStorage.getItem("token")
|
||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
|
console.log(res)
|
||||||
if (res.data.state === "success") {
|
if (res.data.state === "success") {
|
||||||
that.$message.success('修改成功');
|
that.$message.success('修改成功');
|
||||||
setTimeout(() => { //设置延迟执行
|
setTimeout(() => { //设置延迟执行
|
||||||
|
|||||||
@ -46,16 +46,23 @@
|
|||||||
<div style="margin: 10px;">
|
<div style="margin: 10px;">
|
||||||
<div class="address">地址:{{companyAddress}}</div>
|
<div class="address">地址:{{companyAddress}}</div>
|
||||||
<div class="des">简介:{{companyIntroduce}}</div>
|
<div class="des">简介:{{companyIntroduce}}</div>
|
||||||
<div class="des">授权码:<span style="color: green">已生成</span> <span><el-link
|
<div class="des">授权码:
|
||||||
type="primary" :underline="false"
|
<span style="color: green">已生成</span>
|
||||||
style=" font-size: 12px;margin-left: 8px;"
|
|
||||||
@click="toSeeCode">查看</el-link></span></div>
|
|
||||||
<div class="des">授权文件:<span style="color: green">正常</span>
|
|
||||||
<span>
|
<span>
|
||||||
<el-link type="primary" :underline="false"
|
<el-link type="primary" :underline="false"
|
||||||
style=" font-size: 12px;margin-left: 8px;"
|
style=" font-size: 12px;margin-left: 8px;"
|
||||||
@click="dialogTableVisible = true">更换授权文件</el-link>
|
@click="toSeeCode">查看</el-link>
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="des">授权文件:
|
||||||
|
<span style="color: green">正常</span>
|
||||||
|
<span>
|
||||||
|
<el-link type="primary" :underline="false"
|
||||||
|
style=" font-size: 12px;margin-left: 8px;"
|
||||||
|
@click="dialogTableVisible = true">
|
||||||
|
更换授权文件
|
||||||
|
</el-link>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -121,13 +128,13 @@
|
|||||||
复制授权码
|
复制授权码
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<div style="display: flex;width: 100%;">
|
<div>
|
||||||
<div id="qrcode" style="width:200px;height: 200px;margin: 10px"></div>
|
<div style="display: flex;margin-top: 10px;width: 100%;">
|
||||||
|
<div id="qrcode" style="width:200px;height: 200px;"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-input type="textarea" ref="copy" autosize="true" v-model="single.code" resize="none"
|
<el-input type="textarea" ref="copy" autosize="true" v-model="single.code" resize="none"
|
||||||
readonly="true" :autosize="{ minRows: 9, maxRows: 10}"
|
readonly="true" :autosize="{ minRows: 9, maxRows: 10}" style="flex:1;margin-left: 10px"/>
|
||||||
style="margin: 10px;flex: 1 1 0%;">
|
|
||||||
</el-input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -160,278 +167,278 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function generateQRCode(rendermethod, picwidth, picheight, url) {
|
function generateQRCode(rendermethod, picwidth, picheight, url) {
|
||||||
$("#qrcode").qrcode({
|
$("#qrcode").qrcode({
|
||||||
render: rendermethod, // 渲染方式有table方式(IE兼容)和canvas方式
|
render: rendermethod, // 渲染方式有table方式(IE兼容)和canvas方式
|
||||||
width: picwidth, //宽度
|
width: picwidth, //宽度
|
||||||
height:picheight, //高度
|
height: picheight, //高度
|
||||||
text: utf16to8(url), //内容
|
text: utf16to8(url), //内容
|
||||||
typeNumber:-1,//计算模式
|
typeNumber: -1,//计算模式
|
||||||
correctLevel:2,//二维码纠错级别
|
correctLevel: 2,//二维码纠错级别
|
||||||
background:"#ffffff",//背景颜色
|
background: "#ffffff",//背景颜色
|
||||||
foreground:"#000000" //二维码颜色
|
foreground: "#000000" //二维码颜色
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//中文编码格式转换
|
|
||||||
function utf16to8(str) {
|
|
||||||
var out, i, len, c;
|
|
||||||
out = "";
|
|
||||||
len = str.length;
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
c = str.charCodeAt(i);
|
|
||||||
if ((c >= 0x0001) && (c <= 0x007F)) {
|
|
||||||
out += str.charAt(i);
|
|
||||||
} else if (c > 0x07FF) {
|
|
||||||
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
|
|
||||||
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
|
|
||||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
|
||||||
} else {
|
|
||||||
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
|
|
||||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vue.filter("dateFilter", function (date, formatPattern) {
|
|
||||||
return moment(date).format(formatPattern || "YYYY-MM-DD HH:mm:ss");
|
|
||||||
});
|
|
||||||
|
|
||||||
const home = new Vue({
|
|
||||||
el: '#app',
|
|
||||||
data() {
|
|
||||||
const validatePass = (rule, value, callback) => {
|
|
||||||
if (value === '') {
|
|
||||||
callback(new Error('请输入密码'));
|
|
||||||
} else {
|
|
||||||
if (this.from.checkPass !== '') {
|
|
||||||
this.$refs.user.validateField('checkPass');
|
|
||||||
}
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const validatePass2 = (rule, value, callback) => {
|
|
||||||
if (value === '') {
|
|
||||||
callback(new Error('请再次输入密码'));
|
|
||||||
} else if (value !== this.from.editPass) {
|
|
||||||
callback(new Error('两次输入密码不一致!'));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
|
||||||
single: [],
|
|
||||||
dialogCodeVisible: false,
|
|
||||||
dialogTableVisible: false,
|
|
||||||
rightDialogVisible: false,
|
|
||||||
rightDialogTitle: '',
|
|
||||||
tableData: [],
|
|
||||||
|
|
||||||
companyName: '',
|
|
||||||
companyAddress: '',
|
|
||||||
companyIntroduce: '',
|
|
||||||
|
|
||||||
showPassChange: false,
|
|
||||||
from: {
|
|
||||||
pass: '',
|
|
||||||
editPass: '',
|
|
||||||
checkPass: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
pass: [
|
|
||||||
{required: true, message: '请输入原密码', trigger: 'blur'},
|
|
||||||
],
|
|
||||||
editPass: [
|
|
||||||
{required: true, message: '请输入要修改的密码', trigger: 'blur'},
|
|
||||||
{
|
|
||||||
pattern: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,16}$/g,
|
|
||||||
message: '密码必须包含大小写字母及数字,允许特殊字符,长度6-16'
|
|
||||||
},
|
|
||||||
{validator: validatePass, trigger: 'blur'}
|
|
||||||
],
|
|
||||||
checkPass: [
|
|
||||||
{required: true, message: '请再次输入修改的密码', trigger: 'blur'},
|
|
||||||
{validator: validatePass2, trigger: 'blur'}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
generalQrCode: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created: function () {
|
|
||||||
this.checkLogin();
|
|
||||||
this.singlecode();
|
|
||||||
},
|
|
||||||
//绑定方法
|
|
||||||
methods: {
|
|
||||||
singlecode() {
|
|
||||||
const that = this;
|
|
||||||
axios.get('/xinadmin/single', {}).then(function (res) {
|
|
||||||
if (res.data) {
|
|
||||||
if (res.data.license) {
|
|
||||||
that.single = res.data;
|
|
||||||
that.companyName = res.data.company.name;
|
|
||||||
that.companyAddress = res.data.company.address;
|
|
||||||
that.companyIntroduce = res.data.company.introduce;
|
|
||||||
} else {
|
|
||||||
location.href = "index.jsp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(function (error) {
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
checkLogin() {
|
|
||||||
const token = sessionStorage.getItem("token");
|
|
||||||
if (token == null) {
|
|
||||||
location.href = "login.jsp"
|
|
||||||
} else {
|
|
||||||
const str = new Date().getTime()
|
|
||||||
if ((+token + (2 * 60 * 60 * 1000) < str)) {
|
|
||||||
location.href = "login.jsp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
copy() {
|
|
||||||
this.$refs.copy.select()
|
|
||||||
document.execCommand('Copy')
|
|
||||||
this.$message.success('已复制到剪贴板')
|
|
||||||
},
|
|
||||||
uploadfile() {
|
|
||||||
this.$refs.upload.submit()
|
|
||||||
},
|
|
||||||
Success(response) {
|
|
||||||
if (response.state === "success") {
|
|
||||||
this.dialogTableVisible = false;
|
|
||||||
this.$notify({
|
|
||||||
title: '成功',
|
|
||||||
duration: 2000,
|
|
||||||
message: '校验通过',
|
|
||||||
type: 'success'
|
|
||||||
});
|
|
||||||
const that = this;
|
|
||||||
this.$confirm('授权文件已更新,是否立即重启相关应用?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
axios.get('/xinadmin/adminstarter', {}).then(function () {
|
|
||||||
that.$notify({
|
|
||||||
title: '重启中',
|
|
||||||
duration: 2000,
|
|
||||||
message: '正在重启相关应用,请稍侯....',
|
|
||||||
type: 'info'
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
location.reload();
|
|
||||||
}, 2000);
|
|
||||||
}).catch(function (error) {
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
that.$notify({
|
|
||||||
title: '警告',
|
|
||||||
duration: 2000,
|
|
||||||
message: '应用尚未重启,授权尚未生效,请稍后手动重启',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$notify.error({
|
|
||||||
title: '上传失败',
|
|
||||||
message: response.error
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showDetail(item) {
|
|
||||||
this.rightDialogVisible = true;
|
|
||||||
this.rightDialogTitle = item.name + "授权参数详情";
|
|
||||||
let ary = [];
|
|
||||||
let data = item.params;
|
|
||||||
if (data != null) {
|
|
||||||
for (let i in data) {
|
|
||||||
let desc = data[i].name;
|
|
||||||
let value = data[i].value;
|
|
||||||
let valueType = data[i].valueType;
|
|
||||||
|
|
||||||
if (valueType === "number") {
|
|
||||||
if (value === -1)
|
|
||||||
value = "未限制数量";
|
|
||||||
else
|
|
||||||
value = "当前允许最大数量为: " + value + " , 请勿超出限制";
|
|
||||||
} else if (valueType === "boolean") {
|
|
||||||
if (value === data[i].falseDefault)
|
|
||||||
value = "未拥有此功能(或权限)";
|
|
||||||
else if (value === data[i].trueDefault)
|
|
||||||
value = "已拥有此功能(或权限)";
|
|
||||||
}
|
|
||||||
|
|
||||||
let param = {
|
|
||||||
code: i,
|
|
||||||
description: desc,
|
|
||||||
value: value,
|
|
||||||
};
|
|
||||||
ary.push(param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.tableData = ary;
|
|
||||||
},
|
|
||||||
closeDetail() {
|
|
||||||
this.rightDialogVisible = false;
|
|
||||||
this.rightDialogTitle = '';
|
|
||||||
this.tableData = [];
|
|
||||||
},
|
|
||||||
openShow() {
|
|
||||||
this.showPassChange = true;
|
|
||||||
},
|
|
||||||
closeShow() {
|
|
||||||
this.form = {
|
|
||||||
pass: '',
|
|
||||||
editPass: '',
|
|
||||||
checkPass: ''
|
|
||||||
}
|
|
||||||
this.showPassChange = false
|
|
||||||
},
|
|
||||||
edit(user) {
|
|
||||||
this.$refs[user].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.from.editPass === this.from.checkPass) {
|
|
||||||
const that = this;
|
|
||||||
axios.post('/xinadmin/edit', this.from, {
|
|
||||||
headers: {
|
|
||||||
'token': sessionStorage.getItem("token")
|
|
||||||
}
|
|
||||||
}).then(function (res) {
|
|
||||||
if (res.data.state === "success") {
|
|
||||||
that.$message.success('修改成功');
|
|
||||||
setTimeout(() => { //设置延迟执行
|
|
||||||
location.href = "login.jsp";
|
|
||||||
}, 2000);
|
|
||||||
} else {
|
|
||||||
that.$message.error(res.data.mes??"密码错误");
|
|
||||||
}
|
|
||||||
}).catch(function (error) {
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$message.error("两次密码不一致")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
toSeeCode() {
|
|
||||||
this.dialogCodeVisible = true
|
|
||||||
if ( !this.generalQrCode){
|
|
||||||
setTimeout(() => {
|
|
||||||
generateQRCode("table",200, 200, this.single.code);
|
|
||||||
this.generalQrCode = true;
|
|
||||||
} , 100)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
//中文编码格式转换
|
||||||
|
function utf16to8(str) {
|
||||||
|
var out, i, len, c;
|
||||||
|
out = "";
|
||||||
|
len = str.length;
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
c = str.charCodeAt(i);
|
||||||
|
if ((c >= 0x0001) && (c <= 0x007F)) {
|
||||||
|
out += str.charAt(i);
|
||||||
|
} else if (c > 0x07FF) {
|
||||||
|
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
|
||||||
|
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
|
||||||
|
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||||
|
} else {
|
||||||
|
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
|
||||||
|
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vue.filter("dateFilter", function (date, formatPattern) {
|
||||||
|
return moment(date).format(formatPattern || "YYYY-MM-DD HH:mm:ss");
|
||||||
|
});
|
||||||
|
|
||||||
|
const home = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data() {
|
||||||
|
const validatePass = (rule, value, callback) => {
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请输入密码'));
|
||||||
|
} else {
|
||||||
|
if (this.from.checkPass !== '') {
|
||||||
|
this.$refs.user.validateField('checkPass');
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const validatePass2 = (rule, value, callback) => {
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请再次输入密码'));
|
||||||
|
} else if (value !== this.from.editPass) {
|
||||||
|
callback(new Error('两次输入密码不一致!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
single: [],
|
||||||
|
dialogCodeVisible: false,
|
||||||
|
dialogTableVisible: false,
|
||||||
|
rightDialogVisible: false,
|
||||||
|
rightDialogTitle: '',
|
||||||
|
tableData: [],
|
||||||
|
|
||||||
|
companyName: '',
|
||||||
|
companyAddress: '',
|
||||||
|
companyIntroduce: '',
|
||||||
|
|
||||||
|
showPassChange: false,
|
||||||
|
from: {
|
||||||
|
pass: '',
|
||||||
|
editPass: '',
|
||||||
|
checkPass: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
pass: [
|
||||||
|
{required: true, message: '请输入原密码', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
editPass: [
|
||||||
|
{required: true, message: '请输入要修改的密码', trigger: 'blur'},
|
||||||
|
{
|
||||||
|
pattern: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,16}$/g,
|
||||||
|
message: '密码必须包含大小写字母及数字,允许特殊字符,长度6-16'
|
||||||
|
},
|
||||||
|
{validator: validatePass, trigger: 'blur'}
|
||||||
|
],
|
||||||
|
checkPass: [
|
||||||
|
{required: true, message: '请再次输入修改的密码', trigger: 'blur'},
|
||||||
|
{validator: validatePass2, trigger: 'blur'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
generalQrCode: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created: function () {
|
||||||
|
this.checkLogin();
|
||||||
|
this.singlecode();
|
||||||
|
},
|
||||||
|
//绑定方法
|
||||||
|
methods: {
|
||||||
|
singlecode() {
|
||||||
|
const that = this;
|
||||||
|
axios.get('/xinadmin/single', {}).then(function (res) {
|
||||||
|
if (res.data) {
|
||||||
|
if (res.data.license) {
|
||||||
|
that.single = res.data;
|
||||||
|
that.companyName = res.data.company.name;
|
||||||
|
that.companyAddress = res.data.company.address;
|
||||||
|
that.companyIntroduce = res.data.company.introduce;
|
||||||
|
} else {
|
||||||
|
location.href = "index.jsp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
checkLogin() {
|
||||||
|
const token = sessionStorage.getItem("token");
|
||||||
|
if (token == null) {
|
||||||
|
location.href = "login.jsp"
|
||||||
|
} else {
|
||||||
|
const str = new Date().getTime()
|
||||||
|
if ((+token + (2 * 60 * 60 * 1000) < str)) {
|
||||||
|
location.href = "login.jsp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
copy() {
|
||||||
|
this.$refs.copy.select()
|
||||||
|
document.execCommand('Copy')
|
||||||
|
this.$message.success('已复制到剪贴板')
|
||||||
|
},
|
||||||
|
uploadfile() {
|
||||||
|
this.$refs.upload.submit()
|
||||||
|
},
|
||||||
|
Success(response) {
|
||||||
|
if (response.state === "success") {
|
||||||
|
this.dialogTableVisible = false;
|
||||||
|
this.$notify({
|
||||||
|
title: '成功',
|
||||||
|
duration: 2000,
|
||||||
|
message: '校验通过',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
const that = this;
|
||||||
|
this.$confirm('授权文件已更新,是否立即重启相关应用?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
axios.get('/xinadmin/adminstarter', {}).then(function () {
|
||||||
|
that.$notify({
|
||||||
|
title: '重启中',
|
||||||
|
duration: 2000,
|
||||||
|
message: '正在重启相关应用,请稍侯....',
|
||||||
|
type: 'info'
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
location.reload();
|
||||||
|
}, 2000);
|
||||||
|
}).catch(function (error) {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
that.$notify({
|
||||||
|
title: '警告',
|
||||||
|
duration: 2000,
|
||||||
|
message: '应用尚未重启,授权尚未生效,请稍后手动重启',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$notify.error({
|
||||||
|
title: '上传失败',
|
||||||
|
message: response.error
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showDetail(item) {
|
||||||
|
this.rightDialogVisible = true;
|
||||||
|
this.rightDialogTitle = item.name + "授权参数详情";
|
||||||
|
let ary = [];
|
||||||
|
let data = item.params;
|
||||||
|
if (data != null) {
|
||||||
|
for (let i in data) {
|
||||||
|
let desc = data[i].name;
|
||||||
|
let value = data[i].value;
|
||||||
|
let valueType = data[i].valueType;
|
||||||
|
|
||||||
|
if (valueType === "number") {
|
||||||
|
if (value === -1)
|
||||||
|
value = "未限制数量";
|
||||||
|
else
|
||||||
|
value = "当前允许最大数量为: " + value + " , 请勿超出限制";
|
||||||
|
} else if (valueType === "boolean") {
|
||||||
|
if (value === data[i].falseDefault)
|
||||||
|
value = "未拥有此功能(或权限)";
|
||||||
|
else if (value === data[i].trueDefault)
|
||||||
|
value = "已拥有此功能(或权限)";
|
||||||
|
}
|
||||||
|
|
||||||
|
let param = {
|
||||||
|
code: i,
|
||||||
|
description: desc,
|
||||||
|
value: value,
|
||||||
|
};
|
||||||
|
ary.push(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tableData = ary;
|
||||||
|
},
|
||||||
|
closeDetail() {
|
||||||
|
this.rightDialogVisible = false;
|
||||||
|
this.rightDialogTitle = '';
|
||||||
|
this.tableData = [];
|
||||||
|
},
|
||||||
|
openShow() {
|
||||||
|
this.showPassChange = true;
|
||||||
|
},
|
||||||
|
closeShow() {
|
||||||
|
this.form = {
|
||||||
|
pass: '',
|
||||||
|
editPass: '',
|
||||||
|
checkPass: ''
|
||||||
|
}
|
||||||
|
this.showPassChange = false
|
||||||
|
},
|
||||||
|
edit(user) {
|
||||||
|
this.$refs[user].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.from.editPass === this.from.checkPass) {
|
||||||
|
const that = this;
|
||||||
|
axios.post('/xinadmin/edit', this.from, {
|
||||||
|
headers: {
|
||||||
|
'token': sessionStorage.getItem("token")
|
||||||
|
}
|
||||||
|
}).then(function (res) {
|
||||||
|
if (res.data.state === "success") {
|
||||||
|
that.$message.success('修改成功');
|
||||||
|
setTimeout(() => { //设置延迟执行
|
||||||
|
location.href = "login.jsp";
|
||||||
|
}, 2000);
|
||||||
|
} else {
|
||||||
|
that.$message.error(res.data.mes ?? "密码错误");
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error("两次密码不一致")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toSeeCode() {
|
||||||
|
this.dialogCodeVisible = true
|
||||||
|
if (!this.generalQrCode) {
|
||||||
|
setTimeout(() => {
|
||||||
|
generateQRCode("table", 200, 200, this.single.code);
|
||||||
|
this.generalQrCode = true;
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user