Merge branch 'main' of https://git.shikicc.com/wangqiujuan0808/dataControl
commit
32833eb6b8
|
@ -130,6 +130,10 @@ const infoApi = {
|
||||||
editSet(params) {
|
editSet(params) {
|
||||||
return postPBRequest('/driver', params, 54210, params.driver_name)
|
return postPBRequest('/driver', params, 54210, params.driver_name)
|
||||||
},
|
},
|
||||||
|
// 设备导入
|
||||||
|
importDevice(params,driver_name) {
|
||||||
|
return postPBRequest('/driver', params, 54212,driver_name)
|
||||||
|
},
|
||||||
|
|
||||||
// 获取设备列表
|
// 获取设备列表
|
||||||
getSet(params) {
|
getSet(params) {
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
||||||
import infoApi from "@/api/infoApi.js";
|
import infoApi from "@/api/infoApi.js";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
// import { mb_list, mb_info, response} from '../proto/data/pd'
|
|
||||||
export default {
|
export default {
|
||||||
props: ["formData", "dialogVisible", "type", "templateData"],
|
props: ["formData", "dialogVisible", "type", "templateData"],
|
||||||
emits: ["dialogClose", "dialogSuccess"],
|
emits: ["dialogClose", "dialogSuccess"],
|
||||||
|
|
|
@ -76,7 +76,7 @@ export default {
|
||||||
});
|
});
|
||||||
const getD = async () => {
|
const getD = async () => {
|
||||||
const parm = {
|
const parm = {
|
||||||
name: props.formData.driver_name
|
driver_name: props.formData.driver_name
|
||||||
}
|
}
|
||||||
const res = await infoApi.getD(parm);
|
const res = await infoApi.getD(parm);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -113,6 +113,7 @@ export default {
|
||||||
::v-deep .el-form-item__content {
|
::v-deep .el-form-item__content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
|
||||||
>span {
|
>span {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,8 +89,10 @@ export default {
|
||||||
// 请求数据
|
// 请求数据
|
||||||
const param = {
|
const param = {
|
||||||
name: store.state.userInfo.nickName,
|
name: store.state.userInfo.nickName,
|
||||||
password: md5(state.formData.oldPass).toUpperCase(),
|
password: state.formData.oldPass,
|
||||||
new_password: md5(state.formData.newPass).toUpperCase()
|
new_password: state.formData.newPass,
|
||||||
|
// password: md5(state.formData.oldPass).toUpperCase(),
|
||||||
|
// new_password: md5(state.formData.newPass).toUpperCase()
|
||||||
}
|
}
|
||||||
const res = await myApi.editPass(param);
|
const res = await myApi.editPass(param);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="点位导入" width="40%" :before-close="closeDialog">
|
||||||
|
<input style="display:none" type="file" @change="uploadFile" id="fileinput1" class="fileinput" />
|
||||||
|
<label class="filelabel" for="fileinput1">上传</label>
|
||||||
|
<div class="fileName">
|
||||||
|
<span>{{ fileName }}</span>
|
||||||
|
<delete class="delete" @click="delFile" v-if="fileName" />
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||||
|
<el-button size="large" type="primary" @click="saveP"> 保存 </el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
||||||
|
import infoApi from "@/api/infoApi.js";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
export default {
|
||||||
|
props: ["formData", "dialogVisible"],
|
||||||
|
emits: ["dialogClose", "dialogSuccess"],
|
||||||
|
setup(props, ctx) {
|
||||||
|
|
||||||
|
const state = reactive({
|
||||||
|
fileName: '',
|
||||||
|
importData: new FormData()
|
||||||
|
});
|
||||||
|
const visible = computed(() => {
|
||||||
|
return props.dialogVisible;
|
||||||
|
});
|
||||||
|
const closeDialog = () => {
|
||||||
|
ctx.emit("dialogClose");
|
||||||
|
};
|
||||||
|
|
||||||
|
const saveP = async () => {
|
||||||
|
const res = await infoApi.importDevice(state.importData, props.formData.driver_name);
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.message);
|
||||||
|
ctx.emit("dialogSuccess");
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data || res.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uploadFile = (e) => {
|
||||||
|
let file = e.target.files[0];
|
||||||
|
state.fileName = file.name;
|
||||||
|
state.importData.append("file", file);
|
||||||
|
}
|
||||||
|
|
||||||
|
const delFile = () => {
|
||||||
|
state.fileName = '';
|
||||||
|
state.formData = new FormData();
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...toRefs(state),
|
||||||
|
visible,
|
||||||
|
closeDialog,
|
||||||
|
saveP,
|
||||||
|
uploadFile,
|
||||||
|
delFile
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.filelabel {
|
||||||
|
background: #1890ff;
|
||||||
|
border: 1px solid #1890ff;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 5px 15px 5px;
|
||||||
|
margin: 0 2px 0 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fileName {
|
||||||
|
margin: 15px 0;
|
||||||
|
font-size: 16px;
|
||||||
|
.delete {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -31,9 +31,6 @@ export default {
|
||||||
return props.dialogVisible;
|
return props.dialogVisible;
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
state.addForm = props.pointData
|
|
||||||
});
|
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
ctx.emit("dialogClose");
|
ctx.emit("dialogClose");
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<el-drawer v-model="visible" title="驱动配置" direction="rtl" :before-close="closeDialog">
|
<el-drawer v-model="visible" direction="rtl" :before-close="closeDialog" title="驱动配置">
|
||||||
<fieldset class="box2">
|
<fieldset class="box2">
|
||||||
<legend class="box-ht">驱动名称</legend>
|
<legend class="box-ht">驱动名称</legend>
|
||||||
<el-form label-width="130px">
|
<el-form label-width="130px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
{{ formData.name }}
|
{{ form.driver_name }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<!-- 1 modbus_tcp -->
|
<!-- 2 modbus_tcp -->
|
||||||
<el-form size="large" :model="form" label-width="120px" :rules="rules" ref="ruleFormRef" v-if="pztypecode === 1">
|
<el-form size="large" :model="form" label-width="120px" :rules="rules" ref="ruleFormRef" v-if="pztypecode === 2">
|
||||||
<fieldset class="box2">
|
<fieldset class="box2">
|
||||||
<legend class="box-ht">通用配置</legend>
|
<legend class="box-ht">通用配置</legend>
|
||||||
<el-form-item label="轮询时间" prop="polling_time">
|
<el-form-item label="轮询时间" prop="polling_time">
|
||||||
|
@ -27,10 +27,20 @@
|
||||||
<el-form-item label="端口号" prop="port">
|
<el-form-item label="端口号" prop="port">
|
||||||
<el-input-number v-model="form.port" :min="1" clearable />
|
<el-input-number v-model="form.port" :min="1" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="大小端模式" prop="little_endian">
|
||||||
|
<el-select v-model="form.little_endian">
|
||||||
|
<el-option v-for="item in endianArr" :label="item.name" :value="item.value" :key="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="字节顺序" prop="wordswap">
|
||||||
|
<el-select v-model="form.wordswap">
|
||||||
|
<el-option v-for="item in wordswapArr" :label="item.name" :value="item.value" :key="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 2: 'modbus_rtu' -->
|
<!-- 1: 'modbus_rtu' -->
|
||||||
<el-form size="large" :model="form2" label-width="120px" :rules="rules2" ref="ruleFormRef2" v-if="pztypecode === 2">
|
<el-form size="large" :model="form2" label-width="120px" :rules="rules2" ref="ruleFormRef2" v-if="pztypecode === 1">
|
||||||
<fieldset class="box2">
|
<fieldset class="box2">
|
||||||
<legend class="box-ht">通用配置</legend>
|
<legend class="box-ht">通用配置</legend>
|
||||||
<el-form-item label="轮询时间" prop="polling_time">
|
<el-form-item label="轮询时间" prop="polling_time">
|
||||||
|
@ -116,11 +126,14 @@ export default {
|
||||||
const ruleFormRef3 = ref(null);
|
const ruleFormRef3 = ref(null);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
form: {
|
form: {
|
||||||
|
driver_name: '',
|
||||||
polling_time: "",
|
polling_time: "",
|
||||||
faile_retry_time: "",
|
faile_retry_time: "",
|
||||||
host: '',
|
host: '',
|
||||||
port: '',
|
port: '',
|
||||||
id: 1,
|
id: 1,
|
||||||
|
little_endian: false,
|
||||||
|
wordswap: false
|
||||||
},
|
},
|
||||||
form2: {
|
form2: {
|
||||||
polling_time: "",
|
polling_time: "",
|
||||||
|
@ -140,6 +153,26 @@ export default {
|
||||||
rack: 1,
|
rack: 1,
|
||||||
id: 1
|
id: 1
|
||||||
},
|
},
|
||||||
|
endianArr: [
|
||||||
|
{
|
||||||
|
name: '大端模式',
|
||||||
|
value: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '小端模式',
|
||||||
|
value: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
wordswapArr: [
|
||||||
|
{
|
||||||
|
name: '正常',
|
||||||
|
value: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '交换',
|
||||||
|
value: true
|
||||||
|
}
|
||||||
|
],
|
||||||
comArr: [],// com
|
comArr: [],// com
|
||||||
baudRateArr: [{
|
baudRateArr: [{
|
||||||
name: 2400,
|
name: 2400,
|
||||||
|
@ -215,7 +248,9 @@ export default {
|
||||||
}
|
}
|
||||||
}, trigger: 'blur'
|
}, trigger: 'blur'
|
||||||
}],
|
}],
|
||||||
port: [{ required: true, message: "请输入端口号", trigger: "blur" }]
|
port: [{ required: true, message: "请输入端口号", trigger: "blur" }],
|
||||||
|
little_endian: [{ required: true, message: "请选择大小端模式", trigger: "blur" }],
|
||||||
|
wordswap: [{ required: true, message: "请选择字节顺序", trigger: "blur" }]
|
||||||
},
|
},
|
||||||
rules2: {
|
rules2: {
|
||||||
polling_time: [{ required: true, message: "请输入轮询时间", trigger: "blur" }],
|
polling_time: [{ required: true, message: "请输入轮询时间", trigger: "blur" }],
|
||||||
|
@ -246,15 +281,15 @@ export default {
|
||||||
});
|
});
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
var header = {
|
var header = {
|
||||||
driver_name: props.formData.name
|
driver_name: props.formData.driver_name
|
||||||
}
|
}
|
||||||
if (props.pztypecode === 1) {
|
if (props.pztypecode === 2) {
|
||||||
await ruleFormRef.value.validate(async (valid) => {
|
await ruleFormRef.value.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
var param = {
|
var param = {
|
||||||
|
...state.form,
|
||||||
polling_time: Number(state.form.polling_time),
|
polling_time: Number(state.form.polling_time),
|
||||||
faile_retry_time: Number(state.form.faile_retry_time),
|
faile_retry_time: Number(state.form.faile_retry_time),
|
||||||
host: state.form.host,
|
|
||||||
port: Number(state.form.port),
|
port: Number(state.form.port),
|
||||||
id: Number(state.form.id)
|
id: Number(state.form.id)
|
||||||
}
|
}
|
||||||
|
@ -268,7 +303,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (props.pztypecode === 2) {
|
} else if (props.pztypecode === 1) {
|
||||||
await ruleFormRef2.value.validate(async (valid) => {
|
await ruleFormRef2.value.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// var param = {
|
// var param = {
|
||||||
|
@ -332,8 +367,19 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getCom();
|
getD();
|
||||||
|
// getCom();
|
||||||
});
|
});
|
||||||
|
const getD = async () => {
|
||||||
|
const parm = {
|
||||||
|
driver_name: props.formData.driver_name
|
||||||
|
}
|
||||||
|
const res = await infoApi.getD(parm);
|
||||||
|
if (res.code == 0) {
|
||||||
|
state.form = res.data;
|
||||||
|
console.log(state.form);
|
||||||
|
}
|
||||||
|
};
|
||||||
const getCom = async () => {
|
const getCom = async () => {
|
||||||
const parm = {
|
const parm = {
|
||||||
name: props.formData.name
|
name: props.formData.name
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-drawer size="65%" :modal-append-to-body="false" :destroy-on-close="true" :before-close="closeDialog"
|
<el-drawer size="65%" :modal-append-to-body="false" :destroy-on-close="true" :before-close="closeDialog"
|
||||||
v-model="visible">
|
v-model="visible" title="点位管理">
|
||||||
<el-card class="top-title">
|
<el-card class="top-title">
|
||||||
<span>模板名称:{{ formData.template_name }}</span>
|
<span>模板名称:{{ formData.template_name }}</span>
|
||||||
<!-- <span>模板描述:{{ formData.template_description }}</span>
|
<!-- <span>模板描述:{{ formData.template_description }}</span>
|
||||||
|
@ -64,7 +64,6 @@
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Base64 } from 'js-base64';
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
||||||
import infoApi from "@/api/infoApi.js";
|
import infoApi from "@/api/infoApi.js";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-drawer size="65%" :modal-append-to-body="false" :destroy-on-close="true" :before-close="closeDialog"
|
<el-drawer size="65%" :modal-append-to-body="false" :destroy-on-close="true" :before-close="closeDialog"
|
||||||
v-model="visible">
|
v-model="visible" title="设备管理">
|
||||||
<el-card class="top-title">
|
<el-card class="top-title">
|
||||||
<span>通讯名称:{{ formData.driver_name }}</span>
|
<span>通讯名称:{{ formData.driver_name }}</span>
|
||||||
<span>设备数量:{{ propertiesData.length }}</span>
|
<span>设备数量:{{ propertiesData.length }}</span>
|
||||||
|
@ -38,16 +38,21 @@
|
||||||
<AddSet :type="type" :formData="formData1" :setData="setData" :dialogVisible="dialogVisible1" v-if="dialogVisible1"
|
<AddSet :type="type" :formData="formData1" :setData="setData" :dialogVisible="dialogVisible1" v-if="dialogVisible1"
|
||||||
@dialogClose="dialogVisible1 = false" @dialogSuccess="dialogSuccess1">
|
@dialogClose="dialogVisible1 = false" @dialogSuccess="dialogSuccess1">
|
||||||
</AddSet>
|
</AddSet>
|
||||||
|
<ExportDevice :formData="formData1" :dialogVisible="dialogVisible2" v-if="dialogVisible2"
|
||||||
|
@dialogClose="dialogVisible2 = false" @dialogSuccess="dialogSuccess2"></ExportDevice>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
import { onMounted, reactive, ref, toRefs, computed, nextTick } from "vue";
|
||||||
import infoApi from "@/api/infoApi.js";
|
import infoApi from "@/api/infoApi.js";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import AddSet from "@/components/AddSet.vue";
|
import AddSet from "@/components/AddSet.vue";
|
||||||
|
import ExportDevice from "@/components/ExportDevice.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AddSet
|
AddSet,
|
||||||
|
ExportDevice
|
||||||
},
|
},
|
||||||
props: ["formData", "dialogVisible", "qudongOptions"],
|
props: ["formData", "dialogVisible", "qudongOptions"],
|
||||||
emits: ["dialogClose", "dialogSuccess"],
|
emits: ["dialogClose", "dialogSuccess"],
|
||||||
|
@ -58,7 +63,8 @@ export default {
|
||||||
setData: {},
|
setData: {},
|
||||||
dialogVisible1: false,
|
dialogVisible1: false,
|
||||||
type: 'I',
|
type: 'I',
|
||||||
driverInfo: {}
|
driverInfo: {},
|
||||||
|
dialogVisible2:false
|
||||||
});
|
});
|
||||||
const visible = computed(() => {
|
const visible = computed(() => {
|
||||||
return props.dialogVisible;
|
return props.dialogVisible;
|
||||||
|
@ -142,12 +148,34 @@ export default {
|
||||||
getSet();
|
getSet();
|
||||||
};
|
};
|
||||||
|
|
||||||
const importData = () => {
|
const dialogSuccess2 = () => {
|
||||||
|
state.dialogVisible2 = false;
|
||||||
|
getSet();
|
||||||
|
}
|
||||||
|
|
||||||
|
const importData = () => {
|
||||||
|
state.formData1 = props.formData;
|
||||||
|
state.dialogVisible2 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportData = () => {
|
const exportData = () => {
|
||||||
|
axios({
|
||||||
|
method: "post",
|
||||||
|
url: '/driver',
|
||||||
|
headers: {
|
||||||
|
"action": 54211,
|
||||||
|
'driver_name': props.formData.driver_name
|
||||||
|
},
|
||||||
|
responseType: 'blob',
|
||||||
|
}).then((response) => {
|
||||||
|
let fileName = response.headers['content-disposition'].split('filename=')[1];
|
||||||
|
const url = window.URL.createObjectURL(new Blob([response.data]));
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.setAttribute('download', `${decodeURI(fileName.split('"')[1])}`);
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
}).catch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +188,8 @@ export default {
|
||||||
dialogSuccess1,
|
dialogSuccess1,
|
||||||
importData,
|
importData,
|
||||||
exportData,
|
exportData,
|
||||||
editData
|
editData,
|
||||||
|
dialogSuccess2
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -288,7 +288,10 @@ s {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
width: 100px !important;
|
// width: 100px !important;
|
||||||
|
}
|
||||||
|
.el-drawer__title {
|
||||||
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
/* 点击树结构项的选中颜色 */
|
/* 点击树结构项的选中颜色 */
|
||||||
.el-tree--highlight-current .is-current.el-tree-node > .el-tree-node__content {
|
.el-tree--highlight-current .is-current.el-tree-node > .el-tree-node__content {
|
||||||
|
|
|
@ -77,24 +77,25 @@ export default {
|
||||||
// 1. 编码数据
|
// 1. 编码数据
|
||||||
const userInfo = {
|
const userInfo = {
|
||||||
username: state.ruleForm.username,
|
username: state.ruleForm.username,
|
||||||
password: md5(state.ruleForm.password).toUpperCase(),
|
password: state.ruleForm.password
|
||||||
|
// password: md5(state.ruleForm.password).toUpperCase(),
|
||||||
}
|
}
|
||||||
// 模拟登录
|
// 模拟登录
|
||||||
localSet("token", '99999999999999999');
|
// localSet("token", '99999999999999999');
|
||||||
store.commit("setUserInfo", userInfo);
|
|
||||||
window.location.href = '/';
|
|
||||||
|
|
||||||
// myApi.login(userInfo).then(async (res) => {
|
|
||||||
// if (res.code == 0) {
|
|
||||||
// let userInfo = {
|
|
||||||
// nickName: state.ruleForm.username,
|
|
||||||
// };
|
|
||||||
// store.commit("setUserInfo", userInfo);
|
// store.commit("setUserInfo", userInfo);
|
||||||
// getLoginStatus();
|
// window.location.href = '/';
|
||||||
// } else {
|
|
||||||
// ElMessage.error(res.message);
|
myApi.login(userInfo).then(async (res) => {
|
||||||
// }
|
if (res.code == 0) {
|
||||||
// })
|
let userInfo = {
|
||||||
|
nickName: state.ruleForm.username,
|
||||||
|
};
|
||||||
|
store.commit("setUserInfo", userInfo);
|
||||||
|
getLoginStatus();
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@ export default {
|
||||||
const openPz = (item) => {
|
const openPz = (item) => {
|
||||||
state.dialogVisible3 = true;
|
state.dialogVisible3 = true;
|
||||||
state.pztype = state.qudongOptions[item.type];
|
state.pztype = state.qudongOptions[item.type];
|
||||||
state.pztypecode = item.type;
|
state.pztypecode = item.driver_type;
|
||||||
state.formData = JSON.parse(JSON.stringify(item));
|
state.formData = JSON.parse(JSON.stringify(item));
|
||||||
}
|
}
|
||||||
const openDetails = (item) => {
|
const openDetails = (item) => {
|
||||||
|
|
Loading…
Reference in New Issue