flx:优化
This commit is contained in:
parent
a33fc66663
commit
67323cf8df
10
debug.log
10
debug.log
@ -1,2 +1,8 @@
|
||||
[0524/103228.221:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0530/171244.522:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0530/113505.640:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0530/113508.674:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0530/141801.489:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0530/141801.943:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0929/090447.805:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0929/090447.874:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0929/090448.024:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
[0929/090501.978:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1010,7 +1010,7 @@
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
v-model="currentVideoTypeDetail.password"
|
||||
v-model="currentVideoTypeDetail.port"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
@ -1917,8 +1917,8 @@ export default {
|
||||
this.getProjectVideoConfigList();
|
||||
this.Popup.accountServer = true;
|
||||
this.currentVideoTypeDetail.account = this.currentVideoTypeDetail.account;
|
||||
this.currentVideoTypeDetail.password =
|
||||
this.currentVideoTypeDetail.password;
|
||||
this.currentVideoTypeDetail.port =
|
||||
this.currentVideoTypeDetail.port;
|
||||
this.currentVideoTypeDetail.appId = this.currentVideoTypeDetail.appId;
|
||||
this.currentVideoTypeDetail.appSecret =
|
||||
this.currentVideoTypeDetail.appSecret;
|
||||
@ -2237,12 +2237,31 @@ export default {
|
||||
this.addGroupDialog = true;
|
||||
this.addGroupForm = JSON.parse(JSON.stringify(item));
|
||||
this.$nextTick(() => {
|
||||
if (this.addGroupForm.parentObj) {
|
||||
this.selectVal = JSON.parse(this.addGroupForm.parentObj).groupName;
|
||||
const find = this.findNodeById(this.videoTreeData, item.parentId);
|
||||
if(find) {
|
||||
this.selectVal = find.groupName;
|
||||
this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId);
|
||||
}
|
||||
// if (this.addGroupForm.parentObj) {
|
||||
// this.selectVal = JSON.parse(this.addGroupForm.parentObj).groupName;
|
||||
// this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId);
|
||||
// }
|
||||
});
|
||||
},
|
||||
findNodeById(node, id) {
|
||||
const find = node.find((item) => item.id === id);
|
||||
if (find) {
|
||||
return find;
|
||||
}
|
||||
for (let child of node) {
|
||||
if (child.children && child.children.length > 0) {
|
||||
const found = this.findNodeById(child.children, id);
|
||||
if (found) return found;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
deleteGroupFn(item) {
|
||||
// 确定删除分组
|
||||
this.$confirm(
|
||||
@ -2607,17 +2626,23 @@ export default {
|
||||
? obj.enterpriseIds.split(",")
|
||||
: [];
|
||||
this.$nextTick(() => {
|
||||
if (this.currentVideoTypeDetail.parentObj) {
|
||||
this.selectFormVal = JSON.parse(
|
||||
this.currentVideoTypeDetail.parentObj
|
||||
).groupName;
|
||||
this.selectFormTreeData = JSON.parse(
|
||||
this.currentVideoTypeDetail.parentObj
|
||||
);
|
||||
this.$refs.groupFormTree.setCurrentKey(
|
||||
this.currentVideoTypeDetail.parentId
|
||||
);
|
||||
const find = this.findNodeById(this.videoTreeData, obj.groupId);
|
||||
if(find) {
|
||||
this.selectFormVal = find.groupName;
|
||||
this.$refs.groupTree.setCurrentKey(this.currentVideoTypeDetail.groupId);
|
||||
}
|
||||
|
||||
// if (this.currentVideoTypeDetail.parentObj) {
|
||||
// this.selectFormVal = JSON.parse(
|
||||
// this.currentVideoTypeDetail.parentObj
|
||||
// ).groupName;
|
||||
// this.selectFormTreeData = JSON.parse(
|
||||
// this.currentVideoTypeDetail.parentObj
|
||||
// );
|
||||
// this.$refs.groupFormTree.setCurrentKey(
|
||||
// this.currentVideoTypeDetail.parentId
|
||||
// );
|
||||
// }
|
||||
});
|
||||
console.log("编辑内容", obj);
|
||||
},
|
||||
|
||||
@ -429,7 +429,7 @@
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="operation-style">
|
||||
<el-button @click.stop="previewUrl(scope.row)" type="text">
|
||||
<el-button @click.stop="previewFn(scope.row)" type="text">
|
||||
<i class="el-icon-view"></i>
|
||||
预览
|
||||
</el-button>
|
||||
@ -476,7 +476,7 @@
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="operation-style">
|
||||
<el-button @click.stop="previewUrl(scope.row)" type="text">
|
||||
<el-button @click.stop="previewFn(scope.row)" type="text">
|
||||
<i class="el-icon-view"></i>
|
||||
预览
|
||||
</el-button>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,271 +1,278 @@
|
||||
<template>
|
||||
<div class="main-content">
|
||||
<div class="form-content">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="120px"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-form-item label="当前账号:" class="defaultStyle">
|
||||
<span style="color: #5181f6">{{
|
||||
$store.state.userInfo.account
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'头像'" prop="avatar">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:action="$store.state.UPLOADURL"
|
||||
name="files"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<!-- <img
|
||||
<div class="main-content">
|
||||
<div class="form-content">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="120px"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-form-item label="当前账号:" class="defaultStyle">
|
||||
<span style="color: #5181f6">{{
|
||||
$store.state.userInfo.account
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'头像'" prop="avatar">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:action="$store.state.UPLOADURL"
|
||||
name="files"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<!-- <img
|
||||
v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar"
|
||||
/> -->
|
||||
<el-image
|
||||
v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar"
|
||||
>
|
||||
<!-- <div slot="error" class="image-slot">
|
||||
<el-image
|
||||
v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar"
|
||||
>
|
||||
<!-- <div slot="error" class="image-slot">
|
||||
<i class="el-icon-plus" style="font-size: 28px;"></i>
|
||||
</div> -->
|
||||
</el-image>
|
||||
<div class="avatar-uploader-icon" v-else>
|
||||
<i class="el-icon-plus icon-item"></i>
|
||||
<span>上传头像</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名:" prop="realName">
|
||||
<el-input
|
||||
v-model="ruleForm.realName"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别:" prop="sex">
|
||||
<el-radio-group v-model="ruleForm.sex">
|
||||
<el-radio :label="1">男</el-radio>
|
||||
<el-radio :label="2">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱:" prop="personMail">
|
||||
<el-input
|
||||
v-model="ruleForm.personMail"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话号码:" prop="userTel">
|
||||
<el-input
|
||||
v-model="ruleForm.userTel"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain @click="resetForm('ruleForm')"
|
||||
>清空</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')"
|
||||
>确认</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-image>
|
||||
<div class="avatar-uploader-icon" v-else>
|
||||
<i class="el-icon-plus icon-item"></i>
|
||||
<span>上传头像</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名:" prop="realName">
|
||||
<el-input
|
||||
v-model="ruleForm.realName"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别:" prop="sex">
|
||||
<el-radio-group v-model="ruleForm.sex">
|
||||
<el-radio :label="1">男</el-radio>
|
||||
<el-radio :label="2">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱:" prop="personMail">
|
||||
<el-input
|
||||
v-model="ruleForm.personMail"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话号码:" prop="userTel">
|
||||
<el-input
|
||||
v-model="ruleForm.userTel"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="resetForm('ruleForm')"
|
||||
>清空</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')"
|
||||
>确认</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
title="查看大图"
|
||||
>
|
||||
<img width="100%" :src="dialogImageUrl" alt="" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
title="查看大图"
|
||||
>
|
||||
<img width="100%" :src="dialogImageUrl" alt="" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
editSystemUserApi,
|
||||
getSystemUserInfoApi,
|
||||
editSystemUserApi,
|
||||
getSystemUserInfoApi,
|
||||
} from "@/assets/js/api/account";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
avatar: "",
|
||||
realName: "",
|
||||
personMail: "",
|
||||
userTel: "",
|
||||
sex: 1,
|
||||
},
|
||||
rules: {
|
||||
avatar: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
realName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sex: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
personMail: [
|
||||
{
|
||||
required: true,
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱格式",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
userTel: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
pattern: /^1(3|4|5|6|7|8|9)\d{9}$/,
|
||||
},
|
||||
],
|
||||
},
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
created() {
|
||||
this.getSystemUserInfoFn();
|
||||
},
|
||||
methods: {
|
||||
getSystemUserInfoFn() {
|
||||
let that = this;
|
||||
let requestData = {
|
||||
id: this.$store.state.userInfo.userId,
|
||||
};
|
||||
getSystemUserInfoApi(requestData).then((res) => {
|
||||
that.ruleForm = { ...res.result };
|
||||
let originUserInfo = this.$store.state.userInfo;
|
||||
that.$store.commit("setUserInfo", {
|
||||
...originUserInfo,
|
||||
...that.ruleForm
|
||||
});
|
||||
});
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
avatar: "",
|
||||
realName: "",
|
||||
personMail: "",
|
||||
userTel: "",
|
||||
sex: 1,
|
||||
},
|
||||
rules: {
|
||||
avatar: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
realName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sex: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
personMail: [
|
||||
{
|
||||
required: true,
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱格式",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
userTel: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
pattern: /^1(3|4|5|6|7|8|9)\d{9}$/,
|
||||
},
|
||||
],
|
||||
},
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isImage = file.type.indexOf("image/");
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
mounted() {},
|
||||
created() {
|
||||
this.getSystemUserInfoFn();
|
||||
},
|
||||
methods: {
|
||||
getSystemUserInfoFn() {
|
||||
let that = this;
|
||||
let requestData = {
|
||||
id: this.$store.state.userInfo.userId,
|
||||
};
|
||||
getSystemUserInfoApi(requestData).then((res) => {
|
||||
that.ruleForm = { ...res.result };
|
||||
let originUserInfo = this.$store.state.userInfo;
|
||||
that.$store.commit("setUserInfo", {
|
||||
...originUserInfo,
|
||||
avatar: that.ruleForm.avatar,
|
||||
realName: that.ruleForm.realName,
|
||||
personMail: that.ruleForm.personMail,
|
||||
userTel: that.ruleForm.userTel,
|
||||
sex: that.ruleForm.sex,
|
||||
});
|
||||
});
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isImage = file.type.indexOf("image/");
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
if (isImage == -1) {
|
||||
this.$message.error("上传头像只能是图片格式!");
|
||||
return false;
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.ruleForm.avatar = res.data[0].imageUrl;
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let requestData = {
|
||||
...this.ruleForm,
|
||||
};
|
||||
editSystemUserApi(requestData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("修改成功");
|
||||
this.getSystemUserInfoFn();
|
||||
if (isImage == -1) {
|
||||
this.$message.error("上传头像只能是图片格式!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (!isLt2M) {
|
||||
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.ruleForm.avatar = res.data[0].imageUrl;
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let requestData = {
|
||||
...this.ruleForm,
|
||||
};
|
||||
editSystemUserApi(requestData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("修改成功");
|
||||
this.getSystemUserInfoFn();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main-content {
|
||||
.form-content {
|
||||
width: 500px;
|
||||
margin-top: 25px;
|
||||
margin-left: 75px;
|
||||
:deep() {
|
||||
.defaultStyle .el-form-item__label {
|
||||
color: #5181f6;
|
||||
}
|
||||
.form-content {
|
||||
width: 500px;
|
||||
margin-top: 25px;
|
||||
margin-left: 75px;
|
||||
:deep() {
|
||||
.defaultStyle .el-form-item__label {
|
||||
color: #5181f6;
|
||||
}
|
||||
}
|
||||
.imgCodeBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
width: 116px;
|
||||
margin-left: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.imgCodeBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
width: 116px;
|
||||
margin-left: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
color: #8c939d;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.icon-item {
|
||||
font-size: 28px;
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
.image-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
color: #8c939d;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.icon-item {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
.image-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user