mm_os 4.3.6 → 4.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/com/mqtt/drive.js +12 -4
- package/com/mqtt/index.js +60 -25
- package/com/mqtt/script.tpl.js +2 -2
- package/com/nav/tpl/admin_pc/page_channel.vue +5 -5
- package/com/nav/tpl/admin_pc/page_config.vue +5 -5
- package/com/nav/tpl/admin_pc/page_config_form.vue +1 -1
- package/com/nav/tpl/admin_pc/page_default.vue +5 -5
- package/com/nav/tpl/admin_pc/page_form.vue +1 -1
- package/com/nav/tpl/admin_pc/page_lang.vue +5 -5
- package/com/nav/tpl/admin_pc/page_nav.vue +5 -5
- package/com/nav/tpl/admin_pc/page_table.vue +5 -5
- package/com/nav/tpl/admin_pc/page_type.vue +5 -5
- package/com/nav/tpl/admin_pc/page_view.vue +1 -1
- package/com/nav/tpl/dev_pc/page_channel.vue +5 -5
- package/com/nav/tpl/dev_pc/page_config.vue +5 -5
- package/com/nav/tpl/dev_pc/page_default.vue +5 -5
- package/com/nav/tpl/dev_pc/page_form.vue +1 -1
- package/com/nav/tpl/dev_pc/page_nav.vue +5 -5
- package/com/nav/tpl/dev_pc/page_table.vue +5 -5
- package/com/nav/tpl/dev_pc/page_type.vue +6 -6
- package/com/nav/tpl/home_pc/page_channel.vue +5 -5
- package/com/nav/tpl/home_pc/page_default.vue +5 -5
- package/com/nav/tpl/home_pc/page_form.vue +1 -1
- package/com/nav/tpl/home_pc/page_list.vue +5 -5
- package/com/nav/tpl/home_pc/page_nav.vue +5 -5
- package/com/nav/tpl/home_pc/page_type.vue +5 -5
- package/com/nav/tpl/home_pc/page_view.vue +1 -1
- package/com/nav/tpl/home_phone/page_channel.vue +5 -5
- package/com/nav/tpl/home_phone/page_default.vue +5 -5
- package/com/nav/tpl/home_phone/page_form.vue +1 -1
- package/com/nav/tpl/home_phone/page_list.vue +5 -5
- package/com/nav/tpl/home_phone/page_nav.vue +5 -5
- package/com/nav/tpl/home_phone/page_type.vue +5 -5
- package/com/nav/tpl/home_phone/page_view.vue +1 -1
- package/com/pendant/index.js +39 -39
- package/com/sql/drive.js +49 -4
- package/com/template/index.js +141 -141
- package/common/middleware/web_waf/index.js +49 -39
- package/core/app/index.js +711 -710
- package/core/plugin/index.js +13 -43
- package/core/store/index.js +146 -146
- package/package.json +21 -17
- package/server.js +7 -0
- package/com/mqtt/mm_mqtt.js +0 -446
- package/core/store/sql.js +0 -1488
package/com/mqtt/drive.js
CHANGED
|
@@ -307,9 +307,7 @@ Drive.prototype.updateOnline = async function (clientid, online = 1, ip = "") {
|
|
|
307
307
|
if (online) {
|
|
308
308
|
this.drives[clientid].time_last = time_last;
|
|
309
309
|
}
|
|
310
|
-
|
|
311
|
-
await this._updateDeviceInfo(clientid, online, ip);
|
|
312
|
-
}
|
|
310
|
+
await this._updateDeviceInfo(clientid, online, ip);
|
|
313
311
|
};
|
|
314
312
|
|
|
315
313
|
/**
|
|
@@ -321,7 +319,7 @@ Drive.prototype.updateOnline = async function (clientid, online = 1, ip = "") {
|
|
|
321
319
|
*/
|
|
322
320
|
Drive.prototype._updateDeviceInfo = async function (clientid, online, ip) {
|
|
323
321
|
try {
|
|
324
|
-
var { device } = await $.
|
|
322
|
+
var { device } = (await $.eventer.emitFirst('mqtt:check_device', clientid)) || {};
|
|
325
323
|
if (device && online && !device.online) {
|
|
326
324
|
device.online = online;
|
|
327
325
|
if (ip) {
|
|
@@ -481,6 +479,16 @@ Drive.prototype.handle = async function (push_topic, msg, topic, index) {
|
|
|
481
479
|
await this._handleMethodMessage(json, msg, topic, index);
|
|
482
480
|
}
|
|
483
481
|
|
|
482
|
+
// 即时推送设备上报数据到监控大屏
|
|
483
|
+
// 通过事件总线通知订阅者(如 iot/socket/device 模块)
|
|
484
|
+
if (json && json.clientid && json.params) {
|
|
485
|
+
try {
|
|
486
|
+
await $.eventer.emit('iot:device_data', json.clientid, json.params);
|
|
487
|
+
} catch (error) {
|
|
488
|
+
this.log("error", "即时推送设备数据失败", error);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
484
492
|
return;
|
|
485
493
|
};
|
|
486
494
|
|
package/com/mqtt/index.js
CHANGED
|
@@ -79,12 +79,13 @@ class Mqtt extends Manager {
|
|
|
79
79
|
publish_qos: 2,
|
|
80
80
|
username: "server",
|
|
81
81
|
password: process.env.MQTT_PASSWORD || "",
|
|
82
|
-
|
|
82
|
+
info_table: "iot_device",
|
|
83
|
+
data_table: "iot_device_data",
|
|
83
84
|
clean: false,
|
|
84
85
|
longtime: 15000,
|
|
85
86
|
request_timeout: 3000,
|
|
86
|
-
// 在线有效期时长判断 单位:毫秒,
|
|
87
|
-
online_expires:
|
|
87
|
+
// 在线有效期时长判断 单位:毫秒,90000毫秒为1.5分钟
|
|
88
|
+
online_expires: 90000,
|
|
88
89
|
// 在线有效期检测间隔
|
|
89
90
|
online_interval: 10000,
|
|
90
91
|
// 连接超时
|
|
@@ -760,7 +761,7 @@ Mqtt.prototype.saveOnline = async function (arr, online = 1) {
|
|
|
760
761
|
online,
|
|
761
762
|
};
|
|
762
763
|
var db = $.admin.sql("sys").db();
|
|
763
|
-
db.table = this.config.
|
|
764
|
+
db.table = this.config.data_table || "iot_device_data";
|
|
764
765
|
db.size = 0;
|
|
765
766
|
var query = {};
|
|
766
767
|
query.clientid_has = arr.join(",");
|
|
@@ -768,12 +769,12 @@ Mqtt.prototype.saveOnline = async function (arr, online = 1) {
|
|
|
768
769
|
};
|
|
769
770
|
|
|
770
771
|
/**
|
|
771
|
-
*
|
|
772
|
-
* @returns {Array}
|
|
772
|
+
* 获取所有设备数据
|
|
773
|
+
* @returns {Array} 设备数据列表
|
|
773
774
|
*/
|
|
774
|
-
Mqtt.prototype.
|
|
775
|
+
Mqtt.prototype.getClientsData = async function () {
|
|
775
776
|
var db = $.admin.sql("sys").db();
|
|
776
|
-
db.table = this.config.
|
|
777
|
+
db.table = this.config.data_table || "iot_device_data";
|
|
777
778
|
db.size = 0;
|
|
778
779
|
return await db.get({}, "", "clientid, online");
|
|
779
780
|
};
|
|
@@ -783,10 +784,10 @@ Mqtt.prototype.getClients = async function () {
|
|
|
783
784
|
*/
|
|
784
785
|
Mqtt.prototype.updateOnline = async function () {
|
|
785
786
|
var now = new Date().getTime();
|
|
786
|
-
var online_expires = this.config.online_expires;
|
|
787
|
+
var online_expires = this.config.online_expires;
|
|
787
788
|
|
|
788
789
|
// 获取所有客户端
|
|
789
|
-
var drives = await this.
|
|
790
|
+
var drives = await this.getClientsData();
|
|
790
791
|
var result = this._processDeviceStatus(drives, now, online_expires);
|
|
791
792
|
var { list_online, list_offline, list_has } = result;
|
|
792
793
|
|
|
@@ -799,8 +800,14 @@ Mqtt.prototype.updateOnline = async function () {
|
|
|
799
800
|
online_expires,
|
|
800
801
|
);
|
|
801
802
|
|
|
803
|
+
// 去重并解决同一设备既在线又离线的冲突
|
|
804
|
+
var device_status = this._dedupeDeviceStatus(list_online, list_offline);
|
|
805
|
+
|
|
802
806
|
// 批量更新设备状态
|
|
803
|
-
await this._updateDeviceStatus(
|
|
807
|
+
await this._updateDeviceStatus(
|
|
808
|
+
device_status.list_offline,
|
|
809
|
+
device_status.list_online,
|
|
810
|
+
);
|
|
804
811
|
};
|
|
805
812
|
|
|
806
813
|
/**
|
|
@@ -870,20 +877,25 @@ Mqtt.prototype._onlineDevice = function (
|
|
|
870
877
|
list_offline,
|
|
871
878
|
dict,
|
|
872
879
|
) {
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
if (
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
880
|
+
// 无时间戳时无法判断是否超时, 按在线处理, 避免状态无法落地
|
|
881
|
+
if (!device.time_last) {
|
|
882
|
+
if (drive && !drive.online) {
|
|
883
|
+
list_online.push(clientid);
|
|
884
|
+
}
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
var cha = now - device.time_last;
|
|
888
|
+
if (cha > online_expires) {
|
|
889
|
+
if (drive && drive.online) {
|
|
890
|
+
list_offline.push(clientid);
|
|
891
|
+
}
|
|
892
|
+
// 这里需要修改设备状态,但由于参数修改限制,我们直接修改字典
|
|
893
|
+
// 注意:这里仍然会修改外部对象,但这是业务逻辑需要
|
|
894
|
+
device.online = 0;
|
|
895
|
+
delete dict[clientid];
|
|
896
|
+
} else {
|
|
897
|
+
if (drive && !drive.online) {
|
|
898
|
+
list_online.push(clientid);
|
|
887
899
|
}
|
|
888
900
|
}
|
|
889
901
|
};
|
|
@@ -942,6 +954,29 @@ Mqtt.prototype._processUnseenDevices = function (
|
|
|
942
954
|
}
|
|
943
955
|
};
|
|
944
956
|
|
|
957
|
+
/**
|
|
958
|
+
* 去重并解决同一设备既在线又离线的冲突
|
|
959
|
+
* @param {Array} list_online 在线设备列表
|
|
960
|
+
* @param {Array} list_offline 离线设备列表
|
|
961
|
+
* @returns {object} 去重后的在线和离线设备列表
|
|
962
|
+
* @private
|
|
963
|
+
*/
|
|
964
|
+
Mqtt.prototype._dedupeDeviceStatus = function (list_online, list_offline) {
|
|
965
|
+
var onlineSet = new Set(list_online);
|
|
966
|
+
var offlineSet = new Set();
|
|
967
|
+
for (var i = 0; i < list_offline.length; i++) {
|
|
968
|
+
var clientid = list_offline[i];
|
|
969
|
+
// 同一设备既在线又离线时以在线为准, 避免写入顺序互相覆盖
|
|
970
|
+
if (!onlineSet.has(clientid)) {
|
|
971
|
+
offlineSet.add(clientid);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
return {
|
|
975
|
+
list_online: Array.from(onlineSet),
|
|
976
|
+
list_offline: Array.from(offlineSet),
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
|
|
945
980
|
/**
|
|
946
981
|
* 更新设备状态
|
|
947
982
|
* @param {Array} list_offline 离线设备列表
|
package/com/mqtt/script.tpl.js
CHANGED
|
@@ -700,7 +700,7 @@ var _regRecordMethods = function(m, self) {
|
|
|
700
700
|
|
|
701
701
|
var log = _createLog(params, clientid, type);
|
|
702
702
|
if (log) {
|
|
703
|
-
$.
|
|
703
|
+
$.eventer.emit('mqtt:exec_log', clientid, log);
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
|
|
@@ -711,7 +711,7 @@ var _regRecordMethods = function(m, self) {
|
|
|
711
711
|
pass,
|
|
712
712
|
tip,
|
|
713
713
|
device
|
|
714
|
-
} = await $.
|
|
714
|
+
} = (await $.eventer.emitFirst('mqtt:exec_qrcode', clientid, qrcode)) || {};
|
|
715
715
|
if (device && device.online) {
|
|
716
716
|
await self.unlock(clientid, uuid, pass, tip);
|
|
717
717
|
}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<!--{/if}-->
|
|
55
55
|
<!--{/loop}-->
|
|
56
56
|
<div class="mm_item">
|
|
57
|
-
<button class="mm_btn
|
|
57
|
+
<button class="mm_btn btn-primary-x" type="reset"
|
|
58
58
|
@click.native="reset();">重置</button>
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
<div class="bar_action">
|
|
63
63
|
<h5><span>操作</span></h5>
|
|
64
64
|
<div class="btns">
|
|
65
|
-
<button class="mm_btn
|
|
66
|
-
<button class="mm_btn
|
|
65
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
66
|
+
<button class="mm_btn btn-primary-x" @click.native="show = true"
|
|
67
67
|
v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
68
68
|
</div>
|
|
69
69
|
<div class="btn_small">
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
<!--{/if}-->
|
|
140
140
|
<!--{/loop}-->
|
|
141
141
|
<td>
|
|
142
|
-
<a class="mm_btn
|
|
142
|
+
<a class="mm_btn btn-primary"
|
|
143
143
|
:href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
144
144
|
<button class="mm_btn btn_warning"
|
|
145
145
|
@click.native="del_show(o, field)">删除</button>
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
<div class="card_foot">
|
|
189
189
|
<div class="mm_group">
|
|
190
190
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
191
|
-
<button class="mm_btn
|
|
191
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
192
192
|
</div>
|
|
193
193
|
</div>
|
|
194
194
|
</div>
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
<!--{/if}-->
|
|
52
52
|
<!--{/loop}-->
|
|
53
53
|
<div class="mm_item">
|
|
54
|
-
<button class="mm_btn
|
|
54
|
+
<button class="mm_btn btn-primary-x" type="reset" @click="reset();search()">重置</button>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
</form>
|
|
58
58
|
<div class="bar_action">
|
|
59
59
|
<h5><span>操作</span></h5>
|
|
60
60
|
<div class="btns">
|
|
61
|
-
<button class="mm_btn
|
|
62
|
-
<button @click="show = true" class="mm_btn
|
|
61
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
62
|
+
<button @click="show = true" class="mm_btn btn-primary-x" v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
63
63
|
</div>
|
|
64
64
|
<div class="btn_small">
|
|
65
65
|
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
<!--{/if}-->
|
|
131
131
|
<!--{/loop}-->
|
|
132
132
|
<td>
|
|
133
|
-
<a class="mm_btn
|
|
133
|
+
<a class="mm_btn btn-primary" :href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
134
134
|
<button class="mm_btn btn_warning" @click="del_show(o, field)">删除</button>
|
|
135
135
|
</td>
|
|
136
136
|
</tr>
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
<div class="card_foot">
|
|
176
176
|
<div class="mm_group">
|
|
177
177
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
178
|
-
<button class="mm_btn
|
|
178
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
181
181
|
</div>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<div class="card_foot">
|
|
110
110
|
<div class="mm_group">
|
|
111
111
|
<button class="mm_btn btn_default" type="button" @click="cancel()">返回</button>
|
|
112
|
-
<button class="mm_btn
|
|
112
|
+
<button class="mm_btn btn-primary" type="button" @click="submit()">提交</button>
|
|
113
113
|
</div>
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
<!--{/if}-->
|
|
40
40
|
<!--{/loop}-->
|
|
41
41
|
<div class="mm_item">
|
|
42
|
-
<button class="
|
|
42
|
+
<button class="btn-primary-x" type="reset" @click.native="reset();search()">重置</button>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
</form>
|
|
46
46
|
<div class="bar_action">
|
|
47
47
|
<h5><span>操作</span></h5>
|
|
48
48
|
<div class="btns">
|
|
49
|
-
<button class="mm_btn
|
|
50
|
-
<button class="mm_btn
|
|
49
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
50
|
+
<button class="mm_btn btn-primary-x" @click.native="show = true" v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="btn_small">
|
|
53
53
|
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<!--{/if}-->
|
|
105
105
|
<!--{/loop}-->
|
|
106
106
|
<td>
|
|
107
|
-
<a class="
|
|
107
|
+
<a class="btn-primary" :href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
108
108
|
<button class="btn_warning" @click.native="del_show(o, field)">删除</button>
|
|
109
109
|
</td>
|
|
110
110
|
</tr>
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
<div class="card_foot">
|
|
156
156
|
<div class="mm_group">
|
|
157
157
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
158
|
-
<button class="mm_btn
|
|
158
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
159
159
|
</div>
|
|
160
160
|
</div>
|
|
161
161
|
</div>
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
<div class="card_foot">
|
|
99
99
|
<div class="mm_group">
|
|
100
100
|
<button class="mm_btn btn_default" type="button" @click="cancel">返回</button>
|
|
101
|
-
<button class="mm_btn
|
|
101
|
+
<button class="mm_btn btn-primary" type="button" @click="submit()">提交</button>
|
|
102
102
|
</div>
|
|
103
103
|
</div>
|
|
104
104
|
</div>
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
<!--{/if}-->
|
|
52
52
|
<!--{/loop}-->
|
|
53
53
|
<div class="mm_item">
|
|
54
|
-
<button class="mm_btn
|
|
54
|
+
<button class="mm_btn btn-primary-x" type="reset" @click.native="reset();">重置</button>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
</form>
|
|
58
58
|
<div class="bar_action">
|
|
59
59
|
<h5><span>操作</span></h5>
|
|
60
60
|
<div class="btns">
|
|
61
|
-
<button class="mm_btn
|
|
62
|
-
<button class="mm_btn
|
|
61
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
62
|
+
<button class="mm_btn btn-primary-x" @click.native="show = true" v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
63
63
|
</div>
|
|
64
64
|
<div class="btn_small">
|
|
65
65
|
<control_file class="mm_btn btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
<!--{/if}-->
|
|
116
116
|
<!--{/loop}-->
|
|
117
117
|
<td>
|
|
118
|
-
<a class="mm_btn
|
|
118
|
+
<a class="mm_btn btn-primary" :href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
119
119
|
<button class="mm_btn btn_warning" @click.native="del_show(o, field)">删除</button>
|
|
120
120
|
</td>
|
|
121
121
|
</tr>
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
<div class="card_foot">
|
|
173
173
|
<div class="mm_group">
|
|
174
174
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
175
|
-
<button class="mm_btn
|
|
175
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
176
176
|
</div>
|
|
177
177
|
</div>
|
|
178
178
|
</div>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<!--{/if}-->
|
|
59
59
|
<!--{/loop}-->
|
|
60
60
|
<div class="mm_item">
|
|
61
|
-
<button class="mm_btn
|
|
61
|
+
<button class="mm_btn btn-primary-x" type="reset"
|
|
62
62
|
@click.native="reset();">重置</button>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
<div class="bar_action">
|
|
67
67
|
<h5><span>操作</span></h5>
|
|
68
68
|
<div class="btns">
|
|
69
|
-
<button class="mm_btn
|
|
70
|
-
<button @click.native="show = true" class="mm_btn
|
|
69
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
70
|
+
<button @click.native="show = true" class="mm_btn btn-primary-x"
|
|
71
71
|
v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
72
72
|
</div>
|
|
73
73
|
<div class="btn_small">
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
<!--{/if}-->
|
|
144
144
|
<!--{/loop}-->
|
|
145
145
|
<td>
|
|
146
|
-
<a class="mm_btn
|
|
146
|
+
<a class="mm_btn btn-primary"
|
|
147
147
|
:href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
148
148
|
<button class="mm_btn btn_warning"
|
|
149
149
|
@click.native="del_show(o, field)">删除</button>
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
<div class="card_foot">
|
|
193
193
|
<div class="mm_group">
|
|
194
194
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
195
|
-
<button class="mm_btn
|
|
195
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
196
196
|
</div>
|
|
197
197
|
</div>
|
|
198
198
|
</div>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
<!--{/if}-->
|
|
60
60
|
<!--{/loop}-->
|
|
61
61
|
<div class="mm_item">
|
|
62
|
-
<button class="mm_btn
|
|
62
|
+
<button class="mm_btn btn-primary-x" type="reset"
|
|
63
63
|
@click.native="reset();search()">重置</button>
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
<div class="bar_action">
|
|
68
68
|
<h5><span>操作</span></h5>
|
|
69
69
|
<div class="btns">
|
|
70
|
-
<button class="mm_btn
|
|
71
|
-
<button @click.native="show = true" class="mm_btn
|
|
70
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
71
|
+
<button @click.native="show = true" class="mm_btn btn-primary-x"
|
|
72
72
|
v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
73
73
|
</div>
|
|
74
74
|
<div class="btn_small">
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
<!--{/if}-->
|
|
140
140
|
<!--{/loop}-->
|
|
141
141
|
<td>
|
|
142
|
-
<a class="mm_btn
|
|
142
|
+
<a class="mm_btn btn-primary"
|
|
143
143
|
:href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
144
144
|
<button class="mm_btn btn_warning"
|
|
145
145
|
@click.native="del_show(o, field)">删除</button>
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
<div class="card_foot">
|
|
203
203
|
<div class="mm_group">
|
|
204
204
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
205
|
-
<button class="mm_btn
|
|
205
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
206
206
|
</div>
|
|
207
207
|
</div>
|
|
208
208
|
</div>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<!--{/if}-->
|
|
59
59
|
<!--{/loop}-->
|
|
60
60
|
<div class="mm_item">
|
|
61
|
-
<button class="mm_btn
|
|
61
|
+
<button class="mm_btn btn-primary-x" type="reset"
|
|
62
62
|
@click.native="reset();">重置</button>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
<div class="bar_action">
|
|
67
67
|
<h5><span>操作</span></h5>
|
|
68
68
|
<div class="btns">
|
|
69
|
-
<button class="
|
|
70
|
-
<button @click.native="show = true" class="
|
|
69
|
+
<button class="btn-primary-x" url="./${name}_form?">添加</button>
|
|
70
|
+
<button @click.native="show = true" class="btn-primary-x"
|
|
71
71
|
v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
72
72
|
</div>
|
|
73
73
|
<div class="btn_small">
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
<!--{/if}-->
|
|
144
144
|
<!--{/loop}-->
|
|
145
145
|
<td>
|
|
146
|
-
<a class="mm_btn
|
|
146
|
+
<a class="mm_btn btn-primary"
|
|
147
147
|
:href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
|
|
148
148
|
<button class="mm_btn btn_warning"
|
|
149
149
|
@click.native="del_show(o, field)">删除</button>
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
<div class="card_foot">
|
|
193
193
|
<div class="mm_group">
|
|
194
194
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
195
|
-
<button class="mm_btn
|
|
195
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
196
196
|
</div>
|
|
197
197
|
</div>
|
|
198
198
|
</div>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<footer>
|
|
48
48
|
<div class="mm_group">
|
|
49
49
|
<button class="mm_btn btn_default" type="button" @click="cancel()">返回</button>
|
|
50
|
-
<button class="mm_btn
|
|
50
|
+
<button class="mm_btn btn-primary" type="button" @click="submit()">提交</button>
|
|
51
51
|
</div>
|
|
52
52
|
</footer>
|
|
53
53
|
</form>
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
<!--{/if}-->
|
|
40
40
|
<!--{/loop}-->
|
|
41
41
|
<div class="mm_item">
|
|
42
|
-
<button class="
|
|
42
|
+
<button class="btn-primary-x" type="reset" @click.native="reset();search()">重置</button>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div class="bar_action">
|
|
47
47
|
<h5><span>操作</span></h5>
|
|
48
48
|
<div class="btns">
|
|
49
|
-
<button class="
|
|
50
|
-
<button @click.native="show = true" class="
|
|
49
|
+
<button class="btn-primary-x" url="./${name}_form?">添加</button>
|
|
50
|
+
<button @click.native="show = true" class="btn-primary-x" v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="btn_small">
|
|
53
53
|
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
<!--{/if}-->
|
|
109
109
|
<!--{/loop}-->
|
|
110
110
|
<td>
|
|
111
|
-
<button class="mm_btn
|
|
111
|
+
<button class="mm_btn btn-primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</button>
|
|
112
112
|
<button class="mm_btn btn_warning" @click.native="del_show(o, field)">删除</button>
|
|
113
113
|
</td>
|
|
114
114
|
</tr>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
<div class="card_foot">
|
|
148
148
|
<div class="mm_group">
|
|
149
149
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
150
|
-
<button class="mm_btn
|
|
150
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
151
151
|
</div>
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
<!--{/if}-->
|
|
40
40
|
<!--{/loop}-->
|
|
41
41
|
<div class="mm_item">
|
|
42
|
-
<button class="mm_btn
|
|
42
|
+
<button class="mm_btn btn-primary-x" type="reset" @click="reset();search()">重置</button>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div class="bar_action">
|
|
47
47
|
<h5><span>操作</span></h5>
|
|
48
48
|
<div class="btns">
|
|
49
|
-
<button class="mm_btn
|
|
50
|
-
<button @click="show = true" class="mm_btn
|
|
49
|
+
<button class="mm_btn btn-primary-x" url="./${name}_form?">添加</button>
|
|
50
|
+
<button @click="show = true" class="mm_btn btn-primary-x" v-bind:class="{ 'disabled': !selects }">批量修改</button>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="btn_small">
|
|
53
53
|
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
<!--{/if}-->
|
|
109
109
|
<!--{/loop}-->
|
|
110
110
|
<td>
|
|
111
|
-
<mm_btn class="mm_btn
|
|
111
|
+
<mm_btn class="mm_btn btn-primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
|
|
112
112
|
<mm_btn class="mm_btn btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
|
|
113
113
|
</td>
|
|
114
114
|
</tr>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
<div class="card_foot">
|
|
148
148
|
<div class="mm_group">
|
|
149
149
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
150
|
-
<button class="mm_btn
|
|
150
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
151
151
|
</div>
|
|
152
152
|
</div>
|
|
153
153
|
</mm_card>
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
<!--{/if}-->
|
|
40
40
|
<!--{/loop}-->
|
|
41
41
|
<mm_item>
|
|
42
|
-
<mm_btn class="
|
|
42
|
+
<mm_btn class="btn-primary-x" type="reset" @click.native="reset();search()">重置</mm_btn>
|
|
43
43
|
</mm_item>
|
|
44
44
|
</mm_list>
|
|
45
45
|
</mm_form>
|
|
46
46
|
<div class="bar_action">
|
|
47
47
|
<h5><span>操作</span></h5>
|
|
48
48
|
<div class="btns">
|
|
49
|
-
<mm_btn class="
|
|
50
|
-
<mm_btn @click.native="show = true" class="
|
|
49
|
+
<mm_btn class="btn-primary-x" url="./${name}_form?">添加</mm_btn>
|
|
50
|
+
<mm_btn @click.native="show = true" class="btn-primary-x" v-bind:class="{ 'disabled': !selects }">批量修改</mm_btn>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="btn_small">
|
|
53
53
|
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<!--{/if}-->
|
|
105
105
|
<!--{/loop}-->
|
|
106
106
|
<td>
|
|
107
|
-
<mm_btn class="mm_btn
|
|
107
|
+
<mm_btn class="mm_btn btn-primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
|
|
108
108
|
<mm_btn class="mm_btn btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
|
|
109
109
|
</td>
|
|
110
110
|
</tr>
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
<div class="card_foot">
|
|
156
156
|
<div class="mm_group">
|
|
157
157
|
<button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
|
|
158
|
-
<button class="mm_btn
|
|
158
|
+
<button class="mm_btn btn-primary" type="button" @click="batchSet()">提交</button>
|
|
159
159
|
</div>
|
|
160
160
|
</div>
|
|
161
161
|
</mm_card>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<div class="card_foot">
|
|
83
83
|
<div class="mm_group">
|
|
84
84
|
<button class="mm_btn btn_default" type="button" @click="cancel">返回</button>
|
|
85
|
-
<button class="mm_btn
|
|
85
|
+
<button class="mm_btn btn-primary" type="button" @click="submit()">提交</button>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
</mm_card>
|