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

Merge remote-tracking branch 'origin/master'

parents e5d358dd f52e9412
...@@ -27,3 +27,5 @@ yarn lint ...@@ -27,3 +27,5 @@ yarn lint
### Customize configuration ### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/). 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 { ...@@ -114,11 +114,20 @@ export default {
getInfo() { getInfo() {
let routeQuery = this.urlGet(); let routeQuery = this.urlGet();
if (JSON.stringify(routeQuery) !== "{}") { if (JSON.stringify(routeQuery) !== "{}") {
let { devicenum, deviceInfo } = routeQuery; let { devicenum } = routeQuery;
this.devicenum = devicenum; this.devicenum = devicenum;
local.setLocal("devicenum", devicenum);
local.setLocal("deviceInfo", deviceInfo);
this.SET_deviceCode(devicenum); 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 { ...@@ -38,7 +38,6 @@ export default {
justify-content: center; justify-content: center;
img { img {
width: 100%; width: 100%;
height: 100%;
} }
.content { .content {
display: flex; display: flex;
......
...@@ -152,6 +152,7 @@ export default { ...@@ -152,6 +152,7 @@ export default {
}, },
conditions conditions
); );
// 心跳上行消息 // 心跳上行消息
_this.settimer = setInterval(() => { _this.settimer = setInterval(() => {
let beatObj = { let beatObj = {
...@@ -195,11 +196,10 @@ export default { ...@@ -195,11 +196,10 @@ export default {
let deviceInfo = objc.deviceInfo; //设备信息 let deviceInfo = objc.deviceInfo; //设备信息
let serverUrl = serviceInfo.serverUrl; //系统地址 let serverUrl = serviceInfo.serverUrl; //系统地址
let siteId = deviceInfo.siteId; //站点id let siteId = deviceInfo.siteId; //站点id
// let devicenum = objc.devicenum;
// local.setLocal("devicenum", devicenum); // 设备编号
// 保存地址 // 保存地址
local.setLocal("serverUrl", serverUrl); local.setLocal("serverUrl", serverUrl);
local.setLocal("siteId", siteId); local.setLocal("siteId", siteId);
local.setLocal("deviceInfo", deviceInfo);
// 初始化接口 // 初始化接口
setTimeout(() => { setTimeout(() => {
// 查询站点信息 // 查询站点信息
......
...@@ -21,6 +21,9 @@ Vue.use(ElementUI); ...@@ -21,6 +21,9 @@ Vue.use(ElementUI);
import { message } from "@/utils/resetMessage"; import { message } from "@/utils/resetMessage";
Vue.prototype.$message = message; Vue.prototype.$message = message;
import { resetForm } from "@/utils";
Vue.prototype.resetForm = resetForm;
// 表格生成 // 表格生成
import plugins from "./components/formDes/index"; import plugins from "./components/formDes/index";
Vue.use(plugins); Vue.use(plugins);
......
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
}, },
methods: { methods: {
handleReset() { handleReset() {
this.$refs.form.resetFields(); this.resetForm("form");
}, },
handleOk() { handleOk() {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
...@@ -277,9 +277,12 @@ export default { ...@@ -277,9 +277,12 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; setTimeout(() => {
this.form = { ...row };
}, 10);
}, },
handleClose() { handleClose() {
this.resetForm("form");
this.Visible = false; this.Visible = false;
}, },
}, },
...@@ -296,4 +299,4 @@ export default { ...@@ -296,4 +299,4 @@ export default {
/deep/.el-select { /deep/.el-select {
width: 100%; width: 100%;
} }
</style> </style>
\ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:visible.sync="Visible" :visible.sync="Visible"
width="30%" width="30%"
@close="handleClose" @close="handleClose"
:destroy-on-close="true"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form <el-form
...@@ -53,8 +52,8 @@ ...@@ -53,8 +52,8 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { addMatterFolder } from "@/api/matter"; import { addMatterFolder } from "@/api/matter";
export default { export default {
props: { props: {
...@@ -120,21 +119,22 @@ export default { ...@@ -120,21 +119,22 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; setTimeout(() => {
this.form = { ...row };
}, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.$refs.form.resetFields(); this.resetForm("form");
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.loading = false; this.loading = false;
this.$refs.form.resetFields(); this.resetForm("form");
this.Visible = false; this.Visible = false;
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:visible.sync="Visible" :visible.sync="Visible"
width="30%" width="30%"
@close="handleClose" @close="handleClose"
:destroy-on-close="true"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form <el-form
...@@ -186,22 +185,24 @@ export default { ...@@ -186,22 +185,24 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; setTimeout(() => {
this.samplePathFileList = [ this.form = { ...row };
{ this.samplePathFileList = [
name: this.form.sampleName, {
url: this.form.samplePath, name: this.form.sampleName,
}, url: this.form.samplePath,
]; },
];
}, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.$refs.form.resetFields(); this.resetForm("form");
this.samplePathFileList = []; this.samplePathFileList = [];
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.$refs.form.resetFields(); this.resetForm("form");
// this.fileUrlFileList = []; // this.fileUrlFileList = [];
// this.templatePathFileList = []; // this.templatePathFileList = [];
this.samplePathFileList = []; this.samplePathFileList = [];
...@@ -254,4 +255,4 @@ export default { ...@@ -254,4 +255,4 @@ export default {
.el-switch .el-switch__label { .el-switch .el-switch__label {
width: 60px !important; /*开关按钮的宽度大小*/ width: 60px !important; /*开关按钮的宽度大小*/
} }
</style> </style>
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="Visible" :visible.sync="Visible"
:destroy-on-close="true"
width="30%" width="30%"
@close="handleClose" @close="handleClose"
:close-on-click-modal="false" :close-on-click-modal="false"
...@@ -143,15 +142,17 @@ export default { ...@@ -143,15 +142,17 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; setTimeout(() => {
this.form = { ...row };
}, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.$refs.form.resetFields(); this.resetForm("form");
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.$refs.form.resetFields(); this.resetForm("form");
this.Visible = false; this.Visible = false;
}, },
handleChange(val) { handleChange(val) {
...@@ -166,4 +167,4 @@ export default { ...@@ -166,4 +167,4 @@ export default {
/deep/.el-select { /deep/.el-select {
width: 100%; width: 100%;
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<div> <div>
<el-dialog <el-dialog
:title="title" :title="title"
:destroy-on-close="true"
:visible.sync="Visible" :visible.sync="Visible"
width="30%" width="30%"
@close="handleClose" @close="handleClose"
...@@ -176,15 +175,17 @@ export default { ...@@ -176,15 +175,17 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; setTimeout(() => {
this.form = { ...row };
}, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.$refs.form.resetFields(); this.resetForm("form");
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.$refs.form.resetFields(); this.resetForm("form");
this.Visible = false; this.Visible = false;
}, },
}, },
...@@ -195,4 +196,4 @@ export default { ...@@ -195,4 +196,4 @@ export default {
/deep/.el-select { /deep/.el-select {
width: 100%; width: 100%;
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<div> <div>
<el-dialog <el-dialog
:title="title" :title="title"
:destroy-on-close="true"
:visible.sync="Visible" :visible.sync="Visible"
width="30%" width="30%"
@close="handleClose" @close="handleClose"
...@@ -222,15 +221,17 @@ export default { ...@@ -222,15 +221,17 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; setTimeout(() => {
this.form = { ...row };
}, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.$refs.form.resetFields(); this.resetForm("form");
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.$refs.form.resetFields(); this.resetForm("form");
this.Visible = false; this.Visible = false;
}, },
// 切换策略 // 切换策略
...@@ -252,4 +253,4 @@ export default { ...@@ -252,4 +253,4 @@ export default {
/deep/.el-select { /deep/.el-select {
width: 100%; width: 100%;
} }
</style> </style>
\ No newline at end of file
...@@ -17,9 +17,6 @@ export default new Vuex.Store({ ...@@ -17,9 +17,6 @@ export default new Vuex.Store({
path: "", // 门户跳转过来的路由 path: "", // 门户跳转过来的路由
}, },
getters: { getters: {
SET_path(state, path) {
state.path = path;
},
token(state) { token(state) {
return state.token; return state.token;
}, },
...@@ -52,6 +49,9 @@ export default new Vuex.Store({ ...@@ -52,6 +49,9 @@ export default new Vuex.Store({
SET_token(state, token) { SET_token(state, token) {
state.token = token; state.token = token;
}, },
SET_path(state, path) {
state.path = path;
},
}, },
actions: {}, actions: {},
modules: {}, modules: {},
......
...@@ -96,3 +96,10 @@ export class SessionCrypto { ...@@ -96,3 +96,10 @@ export class SessionCrypto {
window.sessionStorage.removeItem(key); 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