l 3.22
This commit is contained in:
parent
e300f6dfd3
commit
7cd7885943
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -19,22 +19,44 @@ export const resetReboot = data => {
|
|||
return axios.post('api/SetReboot', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
||||
};
|
||||
|
||||
// 关于本机备份配置
|
||||
// // 关于本机备份配置
|
||||
|
||||
export const ConfigBackup = () => {
|
||||
return axios.post('api/ConfigBackup', { headers: { 'Content-Type': 'application/json' } });
|
||||
};
|
||||
// export const ConfigBackup = () => {
|
||||
// return axios.post('api/ConfigBackup', { headers: { 'Content-Type': 'application/json' } });
|
||||
// };
|
||||
|
||||
// 还原服务器设置
|
||||
|
||||
export const ConfigRestore = () => {
|
||||
return axios.post('api/ConfigRestore');
|
||||
};
|
||||
// export const ConfigRestore = () => {
|
||||
// return axios.post('api/ConfigRestore');
|
||||
// };
|
||||
|
||||
// 还原服务器出厂设置
|
||||
|
||||
export const ResetFactory = () => {
|
||||
return axios.post('api/ResetFactory', { headers: { 'Content-Type': 'application/json' } });
|
||||
export const initData = () => {
|
||||
return axios.get('api/InitData', { headers: { 'Content-Type': 'application/json' } });
|
||||
};
|
||||
|
||||
// 重新启动接口
|
||||
|
||||
export const RestartComputer = ()=>{
|
||||
return axios.get('api/RestartComputer')
|
||||
}
|
||||
// 更新服务器版本
|
||||
export const update = (data,params)=>{
|
||||
return axios.post('api/Update',data,{
|
||||
params,
|
||||
headers:{'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
// 备份服务器设置
|
||||
export const configBackup = () =>{
|
||||
return axios.get('api/ConfigBackup')
|
||||
}
|
||||
// 还原服务器设置
|
||||
export const configRestore = (data,params)=>{
|
||||
return axios.post('api/ConfigRestore',data,{
|
||||
params,
|
||||
headers:{'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
|
|
@ -23,3 +23,10 @@ export const getTongzrzDetailsApi = params => {
|
|||
params
|
||||
});
|
||||
};
|
||||
|
||||
//根据文件名下载文件
|
||||
export const downFile = (params) =>{
|
||||
return axios.get('api/GetTongzrzDetails',{
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,3 +9,9 @@ export const getUserApi = params => {
|
|||
return axios.get(`api/GetZhanghDetails?UserId=${params}`, {});
|
||||
};
|
||||
//修改密码
|
||||
export const updatePassword = data=>{
|
||||
return axios.post('api/ChangePassword',data,{
|
||||
|
||||
headers:{'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
|
@ -23,8 +23,8 @@ export default {
|
|||
editFigure: 'http://172.16.1.168:5000/api/EditTuxmc',
|
||||
//编辑保存组件弹窗传参
|
||||
setHostName: 'http://172.16.1.168:5000/api/SetHostName',
|
||||
setHostTime: 'http://172.16.1.168:5000/api/SetHostTime'
|
||||
|
||||
setHostTime: 'http://172.16.1.168:5000/api/SetHostTime',
|
||||
// changePassowrd:'http://172.16.1.168:5000/api/ChangePassword'
|
||||
// `http://${ipUurl}:5000/api/AddShipjk`
|
||||
// dataUrl: `http://${ipUurl}:5000/api/AddShipjk`,
|
||||
// getSpareElementOrder: `http://${ipUurl}:5000/api/Upload`,
|
||||
|
|
|
@ -66,10 +66,13 @@ export default {
|
|||
Account:this.param.username,
|
||||
Password:this.param.password,
|
||||
}).then(res => {
|
||||
console.log('c', res);
|
||||
console.log('cxx', res);
|
||||
if(res.data.code==200){
|
||||
this.$message.success('登录成功');
|
||||
localStorage.setItem('ms_username', this.param.username);
|
||||
|
||||
localStorage.setItem('userId', res.data.data.userId);
|
||||
// console.log(localStorage.getItem('userId'));
|
||||
this.$router.push('/');
|
||||
}else{
|
||||
this.$message({
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getHostInfoApi, resetReboot, ConfigBackup, ConfigRestore, ResetFactory } from '../../api/aboutMachine';
|
||||
import { getHostInfoApi, initData, update,configRestore, ResetFactory,RestartComputer } from '../../api/aboutMachine';
|
||||
import { getQuanjszData } from '../../api/index';
|
||||
import serverUrl from '../../config/apiurl.js';
|
||||
import { setQuanjsz } from '@/api/index';
|
||||
|
@ -170,9 +170,9 @@ export default {
|
|||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
resetReboot()
|
||||
RestartComputer()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
console.log(res,'重启启动的接口');
|
||||
this.$message.success(res.data.msg);
|
||||
})
|
||||
.catch(err => {
|
||||
|
@ -247,11 +247,10 @@ export default {
|
|||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
}).then(() => {
|
||||
// 出厂默认设置
|
||||
ResetFactory().then(res => {
|
||||
// console.log(res.data,'出厂默认设置');
|
||||
initData().then(res => {
|
||||
console.log(res.data,'出厂默认设置');
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '重置' + res.data.msg
|
||||
|
|
|
@ -4,12 +4,8 @@
|
|||
<p class="title">通知/日志</p>
|
||||
<el-form ref="form" :model="formData" label-width="100px" style="display:flex">
|
||||
<el-form-item label="日期:">
|
||||
<el-date-picker
|
||||
v-model="formData.value1"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
<el-date-picker v-model="formData.value1" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="内容:">
|
||||
|
@ -21,14 +17,28 @@
|
|||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="lookForMessage" type="primary" >查询</el-button>
|
||||
<el-button @click="lookForMessage" type="primary">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="tableData" :height="tableHeight" border style="width: 100%">
|
||||
<!-- <el-table-column align="center" prop="notificationType" label="通知类型" width="180"></el-table-column> -->
|
||||
<el-table-column align="center" prop="journalTime" label="日期" width="180"></el-table-column>
|
||||
<el-table-column align="center" prop="logDate" label="日期" width="180"></el-table-column>
|
||||
<!-- <el-table-column show-overflow-tooltip align="center" prop="content" label="内容"></el-table-column> -->
|
||||
<el-table-column show-overflow-tooltip align="center" prop="content" label="下载"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip align="center" label="下载">
|
||||
<template slot-scope="scope">
|
||||
<div class="downBox" v-if="scope.row.content.includes(',')">
|
||||
<span @click="downloadFile(scope.row.path.split(',')[0])">
|
||||
{{ scope.row.content.split(',')[0] }}
|
||||
</span>
|
||||
<span @click="downloadFile(scope.row.path.split(',')[1])">
|
||||
{{ scope.row.content.split(',')[1] }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="downBox" v-else>
|
||||
<span @click="downloadFile(scope.row.path)">{{ scope.row.content }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="操作" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="showView(scope.row)" type="text" size="small">详情</el-button>
|
||||
|
@ -37,19 +47,13 @@
|
|||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
layout="sizes, total,prev, pager, next"
|
||||
:total="totalNumber"
|
||||
style="padding-top: 10px;"
|
||||
>
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:current-page.sync="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize"
|
||||
layout="sizes, total,prev, pager, next" :total="totalNumber" style="padding-top: 10px;">
|
||||
</el-pagination>
|
||||
|
||||
<el-dialog :title="concetData.notificationType" :visible.sync="dialogVisible" width="30%" @close="notificClosed">
|
||||
<el-dialog :title="concetData.notificationType" :visible.sync="dialogVisible" width="30%"
|
||||
@close="notificClosed">
|
||||
<span>{{ concetData.content }}</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -57,7 +61,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getTongzrzApi, deleteTongzrzApi, getTongzrzDetailsApi } from '@/api/logs';
|
||||
import { downFile, getTongzrzApi, deleteTongzrzApi, getTongzrzDetailsApi } from '@/api/logs';
|
||||
import moment from 'moment';
|
||||
export default {
|
||||
data() {
|
||||
|
@ -96,12 +100,38 @@ export default {
|
|||
created() {
|
||||
let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
||||
this.tableHeight = windowHeight - 270;
|
||||
},
|
||||
mounted() {
|
||||
this.setTimes();
|
||||
this.getData();
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 下载文件
|
||||
downloadFile(file) {
|
||||
|
||||
// console.log(data,'点击数据');
|
||||
// console.log(file);
|
||||
// 调取接口
|
||||
// downFile({'filepath':file}).then(res=>{
|
||||
|
||||
// })
|
||||
// console.log(window.location.origin);
|
||||
var url = window.location.origin + '/api/GetTongzrzDetails?filepath=' + file
|
||||
// console.log(url, '地址');
|
||||
const a = document.createElement('a')
|
||||
a.href = url
|
||||
a.download = file // 下载后文件名
|
||||
a.style.display = 'none'
|
||||
document.body.appendChild(a)
|
||||
a.click() // 点击下载
|
||||
document.body.removeChild(a)
|
||||
},
|
||||
setTimes() {
|
||||
let arr = [];
|
||||
//当前时间
|
||||
|
@ -110,7 +140,7 @@ export default {
|
|||
let i = moment(s)
|
||||
.subtract(2, 'days')
|
||||
.format('YYYY-MM-DD');
|
||||
arr = [s, i];
|
||||
arr = [i, s];
|
||||
this.formData.value1 = arr;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
@ -166,22 +196,28 @@ export default {
|
|||
//点击查询按钮
|
||||
lookForMessage() {
|
||||
this.currentPage = 1;
|
||||
for (let i = 0; i < this.formData.value1.length; i++) {
|
||||
this.formData.value1[i] = moment(this.formData.value1[i]).format('YYYY-MM-DD')
|
||||
}
|
||||
// console.log(this.formData.value1);
|
||||
this.getData();
|
||||
},
|
||||
//表格数据
|
||||
getData() {
|
||||
|
||||
getTongzrzApi({
|
||||
Content: this.formData.content,
|
||||
Type: this.formData.notificationType,
|
||||
CurrentPage: this.currentPage,
|
||||
PageSize: this.pageSize,
|
||||
// Content: this.formData.content,
|
||||
// Type: this.formData.notificationType,
|
||||
// CurrentPage: this.currentPage,
|
||||
// PageSize: this.pageSize,
|
||||
StartTime: this.formData.value1.length > 0 ? this.formData.value1[0] : '',
|
||||
EndTime: this.formData.value1.length > 0 ? this.formData.value1[1] : ''
|
||||
})
|
||||
.then(res => {
|
||||
if (res.data.code === 200) {
|
||||
this.tableData = res.data.data.data;
|
||||
this.totalNumber = res.data.data.total;
|
||||
// console.log(res.data.data);
|
||||
this.tableData = res.data.data;
|
||||
this.totalNumber = res.data.data.length;
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
|
@ -201,6 +237,10 @@ export default {
|
|||
this.currentPage = val;
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -209,4 +249,8 @@ export default {
|
|||
.test-div i {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.downBox span {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -16,7 +16,17 @@
|
|||
<el-button @click="editPassword" slot="prepend" size="small" type="primary">修改密码</el-button>
|
||||
</div>
|
||||
<el-dialog title="修改密码" :visible.sync="dialogVisible" width="30%" @close="dialogClosed">
|
||||
<el-input v-model="password"></el-input>
|
||||
<el-form label-width="auto" :model="userData">
|
||||
<el-form-item label="账号" aria-disabled="true">
|
||||
<el-input type="test" :disabled="true" v-model="userData.Account"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="原密码">
|
||||
<el-input type="password" v-model="userData.oldPassword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码">
|
||||
<el-input type="password" v-model="userData.newPassword"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="savePassword">确定</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
|
@ -26,18 +36,22 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserApi } from '@/api/myld.js';
|
||||
import { getUserApi,updatePassword } from '@/api/myld.js';
|
||||
import serverUrl from '@/config/apiurl.js';
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
password: '',
|
||||
dialogVisible: false,
|
||||
formLabelAlign: {
|
||||
userName: '',
|
||||
account: '',
|
||||
password: ''
|
||||
},
|
||||
userData: {
|
||||
Account: '',
|
||||
oldPassword: '',
|
||||
newPassword: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -47,46 +61,74 @@ export default {
|
|||
},
|
||||
//保存密码
|
||||
savePassword() {
|
||||
// console.log(serverUrl);
|
||||
let formData = new FormData();
|
||||
formData.append('userName', this.formLabelAlign.userName);
|
||||
formData.append('account', this.formLabelAlign.account);
|
||||
formData.append('roleId', this.formLabelAlign.roleId);
|
||||
formData.append('IsEnable', 1);
|
||||
formData.append('passWord', this.password);
|
||||
formData.append('userId', this.formLabelAlign.userId);
|
||||
axios({
|
||||
method: 'post',
|
||||
url: serverUrl.editRoleApi,
|
||||
data: formData
|
||||
}).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
console.log(this.userData);
|
||||
formData.append('Account', this.userData.Account);
|
||||
formData.append('OldPassword', this.userData.oldPassword);
|
||||
formData.append('NewPassword', this.userData.newPassword);
|
||||
console.log(formData,'数据');
|
||||
|
||||
updatePassword(formData).then(res=>{
|
||||
console.log(res,'修改状态');
|
||||
if(res.data.code==200){
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.$router.push('/Login');
|
||||
this.getUser();
|
||||
} else {
|
||||
// this.getUser();
|
||||
}else{
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
// formData.append('IsEnable', 1);
|
||||
// formData.append('passWord', this.password);
|
||||
// formData.append('userId', this.formLabelAlign.userId);
|
||||
// axios({
|
||||
// method: 'post',
|
||||
// url: serverUrl.editRoleApi,
|
||||
// data: formData
|
||||
// }).then(res => {
|
||||
// if (res.data.code == 200) {
|
||||
// this.$message({
|
||||
// message: res.data.msg,
|
||||
// type: 'success'
|
||||
// });
|
||||
// this.dialogVisible = false;
|
||||
// this.$router.push('/Login');
|
||||
// this.getUser();
|
||||
// } else {
|
||||
// this.$message({
|
||||
// message: res.data.msg,
|
||||
// type: 'warning'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
},
|
||||
editPassword() {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
getUser() {
|
||||
if (window.localStorage.getItem('user')) {
|
||||
let form = JSON.parse(window.localStorage.getItem('user'));
|
||||
getUserApi(form.userId)
|
||||
// console.log(window.localStorage.getItem('userId'),'id');
|
||||
if (window.localStorage.getItem('userId')) {
|
||||
let userId = window.localStorage.getItem('userId');
|
||||
// console.log(form,'数据');
|
||||
getUserApi(userId)
|
||||
.then(res => {
|
||||
if (res.data.code == 200) {
|
||||
// console.log(res.data);
|
||||
this.formLabelAlign = res.data.data;
|
||||
this.formLabelAlign.password = '******';
|
||||
console.log(this.formLabelAlign);
|
||||
this.userData.Account = this.formLabelAlign.account
|
||||
// console.log(this.formLabelAlign);
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ module.exports = {
|
|||
// '^/aps':'',
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue