Commit 3c801f7a authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents e5d358dd f52e9412
......@@ -27,3 +27,5 @@ yarn lint
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
http://localhost:8081?v=409&serveinfo={"deviceInfo":{"enabled":1,"productId":10,"productName":"样表机","siteCode":"","siteId":1,"siteName":"","source":1},"rabbmitInfo":{"downTopicFilter":"/down/C0-FB-F9-CD-3B-A4","exchangeName":"phxt.pdj","host":"10.12.185.213","messageTtl":"86400000","password":"admin@2020","port":5672,"uploadTopicFilter":"/upload/C0-FB-F9-CD-3B-A4","username":"taxi_mq","virtualHost":"/test"},"serviceInfo":{"homeUrl":"","serverUrl":"http://192.168.0.98:11078/"}}&devicenum=18-93-7F-C0-AD-B5
......@@ -114,11 +114,20 @@ export default {
getInfo() {
let routeQuery = this.urlGet();
if (JSON.stringify(routeQuery) !== "{}") {
let { devicenum, deviceInfo } = routeQuery;
let { devicenum } = routeQuery;
this.devicenum = devicenum;
local.setLocal("devicenum", devicenum);
local.setLocal("deviceInfo", deviceInfo);
this.SET_deviceCode(devicenum);
local.setLocal("devicenum", devicenum);
// window软件测试
let serveinfo = JSON.parse(decodeURIComponent(routeQuery["serveinfo"]));
if (JSON.stringify(serveinfo) !== "{}") {
let { deviceInfo, serviceInfo } = serveinfo;
let { serverUrl } = serviceInfo;
let siteId = deviceInfo.siteId; //站点id
local.setLocal("siteId", siteId);
local.setLocal("serverUrl", serverUrl);
local.setLocal("deviceInfo", deviceInfo);
}
}
},
// 获取首页信息
......
......@@ -38,7 +38,6 @@ export default {
justify-content: center;
img {
width: 100%;
height: 100%;
}
.content {
display: flex;
......
......@@ -152,6 +152,7 @@ export default {
},
conditions
);
// 心跳上行消息
_this.settimer = setInterval(() => {
let beatObj = {
......@@ -195,11 +196,10 @@ export default {
let deviceInfo = objc.deviceInfo; //设备信息
let serverUrl = serviceInfo.serverUrl; //系统地址
let siteId = deviceInfo.siteId; //站点id
// let devicenum = objc.devicenum;
// local.setLocal("devicenum", devicenum); // 设备编号
// 保存地址
local.setLocal("serverUrl", serverUrl);
local.setLocal("siteId", siteId);
local.setLocal("deviceInfo", deviceInfo);
// 初始化接口
setTimeout(() => {
// 查询站点信息
......
......@@ -21,6 +21,9 @@ Vue.use(ElementUI);
import { message } from "@/utils/resetMessage";
Vue.prototype.$message = message;
import { resetForm } from "@/utils";
Vue.prototype.resetForm = resetForm;
// 表格生成
import plugins from "./components/formDes/index";
Vue.use(plugins);
......
......@@ -255,7 +255,7 @@ export default {
},
methods: {
handleReset() {
this.$refs.form.resetFields();
this.resetForm("form");
},
handleOk() {
this.$refs.form.validate(async (valid) => {
......@@ -277,9 +277,12 @@ export default {
},
// 编辑
onEdit(row) {
this.form = { ...row };
setTimeout(() => {
this.form = { ...row };
}, 10);
},
handleClose() {
this.resetForm("form");
this.Visible = false;
},
},
......@@ -296,4 +299,4 @@ export default {
/deep/.el-select {
width: 100%;
}
</style>
\ No newline at end of file
</style>
......@@ -5,7 +5,6 @@
:visible.sync="Visible"
width="30%"
@close="handleClose"
:destroy-on-close="true"
:close-on-click-modal="false"
>
<el-form
......@@ -53,8 +52,8 @@
</el-dialog>
</div>
</template>
<script>
<script>
import { addMatterFolder } from "@/api/matter";
export default {
props: {
......@@ -120,21 +119,22 @@ export default {
},
// 编辑
onEdit(row) {
this.form = { ...row };
setTimeout(() => {
this.form = { ...row };
}, 10);
},
// 重置
handleRest() {
this.$refs.form.resetFields();
this.resetForm("form");
},
// 关闭
handleClose() {
this.loading = false;
this.$refs.form.resetFields();
this.resetForm("form");
this.Visible = false;
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
......@@ -5,7 +5,6 @@
:visible.sync="Visible"
width="30%"
@close="handleClose"
:destroy-on-close="true"
:close-on-click-modal="false"
>
<el-form
......@@ -186,22 +185,24 @@ export default {
},
// 编辑
onEdit(row) {
this.form = { ...row };
this.samplePathFileList = [
{
name: this.form.sampleName,
url: this.form.samplePath,
},
];
setTimeout(() => {
this.form = { ...row };
this.samplePathFileList = [
{
name: this.form.sampleName,
url: this.form.samplePath,
},
];
}, 10);
},
// 重置
handleRest() {
this.$refs.form.resetFields();
this.resetForm("form");
this.samplePathFileList = [];
},
// 关闭
handleClose() {
this.$refs.form.resetFields();
this.resetForm("form");
// this.fileUrlFileList = [];
// this.templatePathFileList = [];
this.samplePathFileList = [];
......@@ -254,4 +255,4 @@ export default {
.el-switch .el-switch__label {
width: 60px !important; /*开关按钮的宽度大小*/
}
</style>
\ No newline at end of file
</style>
......@@ -3,7 +3,6 @@
<el-dialog
:title="title"
:visible.sync="Visible"
:destroy-on-close="true"
width="30%"
@close="handleClose"
:close-on-click-modal="false"
......@@ -143,15 +142,17 @@ export default {
},
// 编辑
onEdit(row) {
this.form = { ...row };
setTimeout(() => {
this.form = { ...row };
}, 10);
},
// 重置
handleRest() {
this.$refs.form.resetFields();
this.resetForm("form");
},
// 关闭
handleClose() {
this.$refs.form.resetFields();
this.resetForm("form");
this.Visible = false;
},
handleChange(val) {
......@@ -166,4 +167,4 @@ export default {
/deep/.el-select {
width: 100%;
}
</style>
\ No newline at end of file
</style>
......@@ -2,7 +2,6 @@
<div>
<el-dialog
:title="title"
:destroy-on-close="true"
:visible.sync="Visible"
width="30%"
@close="handleClose"
......@@ -176,15 +175,17 @@ export default {
},
// 编辑
onEdit(row) {
this.form = { ...row };
setTimeout(() => {
this.form = { ...row };
}, 10);
},
// 重置
handleRest() {
this.$refs.form.resetFields();
this.resetForm("form");
},
// 关闭
handleClose() {
this.$refs.form.resetFields();
this.resetForm("form");
this.Visible = false;
},
},
......@@ -195,4 +196,4 @@ export default {
/deep/.el-select {
width: 100%;
}
</style>
\ No newline at end of file
</style>
......@@ -2,7 +2,6 @@
<div>
<el-dialog
:title="title"
:destroy-on-close="true"
:visible.sync="Visible"
width="30%"
@close="handleClose"
......@@ -222,15 +221,17 @@ export default {
},
// 编辑
onEdit(row) {
this.form = { ...row };
setTimeout(() => {
this.form = { ...row };
}, 10);
},
// 重置
handleRest() {
this.$refs.form.resetFields();
this.resetForm("form");
},
// 关闭
handleClose() {
this.$refs.form.resetFields();
this.resetForm("form");
this.Visible = false;
},
// 切换策略
......@@ -252,4 +253,4 @@ export default {
/deep/.el-select {
width: 100%;
}
</style>
\ No newline at end of file
</style>
......@@ -17,9 +17,6 @@ export default new Vuex.Store({
path: "", // 门户跳转过来的路由
},
getters: {
SET_path(state, path) {
state.path = path;
},
token(state) {
return state.token;
},
......@@ -52,6 +49,9 @@ export default new Vuex.Store({
SET_token(state, token) {
state.token = token;
},
SET_path(state, path) {
state.path = path;
},
},
actions: {},
modules: {},
......
......@@ -96,3 +96,10 @@ export class SessionCrypto {
window.sessionStorage.removeItem(key);
}
}
// 表单重置
export function resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment