mm_os 1.3.4 → 1.3.6
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/README.en.md +36 -0
- package/README.md +25 -166
- package/conf.json +3 -0
- package/core/base/index.js +29 -0
- package/core/base/mqtt/index.js +268 -0
- package/core/base/mqtt/lib.js +40 -0
- package/core/base/web/index.js +110 -0
- package/core/com/api/com.json +4 -0
- package/{bin → core}/com/api/config.tpl.json +9 -7
- package/{bin → core}/com/api/drive.js +239 -64
- package/{bin → core}/com/api/index.js +8 -9
- package/{bin → core}/com/api/oauth.js +23 -14
- package/core/com/api/script.js +32 -0
- package/core/com/db/com.json +4 -0
- package/{bin → core}/com/db/drive.js +99 -65
- package/{bin → core}/com/db/index.js +2 -2
- package/core/com/event/com.json +4 -0
- package/{bin → core}/com/event/config.tpl.json +2 -2
- package/core/com/event/drive.js +125 -0
- package/{bin → core}/com/event/index.js +5 -10
- package/core/com/event/script.js +26 -0
- package/core/com/eventer/com.js +450 -0
- package/core/com/eventer/com.json +4 -0
- package/core/com/middleware/com.js +128 -0
- package/core/com/middleware/com.json +4 -0
- package/core/com/middleware/config.tpl.json +8 -0
- package/core/com/middleware/script.js +9 -0
- package/core/com/mqtt/com.json +4 -0
- package/core/com/mqtt/config.tpl.json +12 -0
- package/core/com/mqtt/drive.js +139 -0
- package/core/com/mqtt/index.js +138 -0
- package/core/com/mqtt/script.js +33 -0
- package/core/com/msg/com.js +296 -0
- package/core/com/msg/com.json +4 -0
- package/{bin → core}/com/nav/drive.js +42 -17
- package/{bin → core}/com/nav/index.js +4 -4
- package/core/com/nav/tpl/admin_pc/page_channel.vue +299 -0
- package/core/com/nav/tpl/admin_pc/page_config.vue +279 -0
- package/core/com/nav/tpl/admin_pc/page_config_form.vue +194 -0
- package/core/com/nav/tpl/admin_pc/page_default.vue +287 -0
- package/core/com/nav/tpl/admin_pc/page_form.vue +180 -0
- package/core/com/nav/tpl/admin_pc/page_lang.vue +265 -0
- package/core/com/nav/tpl/admin_pc/page_nav.vue +313 -0
- package/core/com/nav/tpl/admin_pc/page_table.vue +285 -0
- package/core/com/nav/tpl/admin_pc/page_type.vue +313 -0
- package/core/com/nav/tpl/dev_pc/page_channel.vue +253 -0
- package/core/com/nav/tpl/dev_pc/page_config.vue +253 -0
- package/core/com/nav/tpl/dev_pc/page_default.vue +247 -0
- package/core/com/nav/tpl/dev_pc/page_form.vue +162 -0
- package/core/com/nav/tpl/dev_pc/page_nav.vue +253 -0
- package/core/com/nav/tpl/dev_pc/page_table.vue +247 -0
- package/core/com/nav/tpl/dev_pc/page_type.vue +253 -0
- package/{bin/com/nav/tpl/home_phone → core/com/nav/tpl/home_pc}/page_channel.vue +231 -231
- package/{bin/com/nav/tpl/home_phone → core/com/nav/tpl/home_pc}/page_default.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_pc/page_form.vue +9 -9
- package/{bin → core}/com/nav/tpl/home_pc/page_list.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_pc/page_nav.vue +221 -221
- package/{bin/com/nav/tpl/home_phone → core/com/nav/tpl/home_pc}/page_type.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_pc/page_view.vue +8 -8
- package/{bin/com/nav/tpl/home_pc → core/com/nav/tpl/home_phone}/page_channel.vue +231 -231
- package/{bin/com/nav/tpl/home_pc → core/com/nav/tpl/home_phone}/page_default.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_phone/page_form.vue +9 -9
- package/{bin → core}/com/nav/tpl/home_phone/page_list.vue +231 -231
- package/{bin/com/nav/tpl/admin_pc → core/com/nav/tpl/home_phone}/page_nav.vue +236 -220
- package/{bin/com/nav/tpl/home_pc → core/com/nav/tpl/home_phone}/page_type.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_phone/page_view.vue +8 -8
- package/core/com/nav/viewmodel.js +296 -0
- package/{bin → core}/com/param/config.tpl.json +24 -0
- package/{bin → core}/com/param/drive.js +47 -15
- package/core/com/plugin/com.json +4 -0
- package/core/com/plugin/config.tpl.json +20 -0
- package/{bin → core}/com/plugin/drive.js +5 -8
- package/{bin → core}/com/plugin/index.js +11 -56
- package/core/com/socket/README.md +47 -0
- package/core/com/socket/com.json +4 -0
- package/core/com/socket/config.tpl.json +14 -0
- package/{bin → core}/com/socket/drive.js +74 -51
- package/{bin → core}/com/socket/index.js +4 -2
- package/{bin → core}/com/socket/script.js +8 -6
- package/core/com/sql/config.tpl.json +70 -0
- package/{bin → core}/com/sql/drive.js +281 -58
- package/core/com/static/com.json +4 -0
- package/core/com/static/config.tpl.json +20 -0
- package/{bin → core}/com/static/drive.js +6 -4
- package/{bin → core}/com/static/index.js +5 -1
- package/core/com/task/com.json +4 -0
- package/core/com/task/config.tpl.json +24 -0
- package/core/com/task/drive.js +374 -0
- package/{bin → core}/com/task/index.js +14 -20
- package/core/com/task/script.js +37 -0
- package/core/com/timer/com.js +217 -0
- package/core/com/timer/com.json +4 -0
- package/core/com/tpl/com.js +19 -0
- package/core/com/tpl/com.json +4 -0
- package/index.js +161 -740
- package/lib/actions.js +50 -0
- package/lib/app.js +73 -0
- package/lib/base.js +355 -0
- package/lib/com.js +31 -0
- package/lib/game.js +31 -0
- package/lib/ref.js +121 -0
- package/middleware/cors/index.js +57 -0
- package/middleware/cors/middleware.json +7 -0
- package/middleware/mqtt_base/index.js +10 -0
- package/middleware/mqtt_base/middleware.json +8 -0
- package/{waf.js → middleware/waf/index.js} +12 -2
- package/middleware/waf/middleware.json +9 -0
- package/middleware/web_base/index.js +67 -0
- package/middleware/web_base/middleware.json +9 -0
- package/middleware/web_event/index.js +411 -0
- package/middleware/web_event/middleware.json +10 -0
- package/middleware/web_proxy/index.js +24 -0
- package/middleware/web_proxy/middleware.json +9 -0
- package/middleware/web_router/index.js +33 -0
- package/middleware/web_router/middleware.json +10 -0
- package/middleware/web_socket/index.js +21 -0
- package/middleware/web_socket/middleware.json +9 -0
- package/middleware/web_static/index.js +26 -0
- package/middleware/web_static/middleware.json +9 -0
- package/nodemon.json +12 -2
- package/package.json +56 -66
- package/.gitattributes +0 -5
- package/bin/com/README.md +0 -2
- package/bin/com/api/script.js +0 -14
- package/bin/com/cmd/README.md +0 -3
- package/bin/com/cmd/config.tpl.json +0 -41
- package/bin/com/cmd/drive.js +0 -512
- package/bin/com/cmd/index.js +0 -213
- package/bin/com/cmd/old/5w2h.js +0 -54
- package/bin/com/cmd/old/drive.js +0 -423
- package/bin/com/cmd/script.js +0 -11
- package/bin/com/event/drive.js +0 -69
- package/bin/com/event/script.js +0 -12
- package/bin/com/nav/tpl/admin_pc/page_channel.vue +0 -234
- package/bin/com/nav/tpl/admin_pc/page_default.vue +0 -236
- package/bin/com/nav/tpl/admin_pc/page_form.vue +0 -152
- package/bin/com/nav/tpl/admin_pc/page_table.vue +0 -236
- package/bin/com/nav/tpl/admin_pc/page_type.vue +0 -234
- package/bin/com/nav/tpl/home_phone/page_nav.vue +0 -221
- package/bin/com/nav/viewmodel.js +0 -161
- package/bin/com/plugin/config.tpl.json +0 -11
- package/bin/com/socket/config.tpl.json +0 -8
- package/bin/com/sql/config.tpl.json +0 -34
- package/bin/com/static/config.tpl.json +0 -11
- package/bin/com/task/config.tpl.json +0 -13
- package/bin/com/task/drive.js +0 -288
- package/bin/com/task/script.js +0 -38
- package/bin/com.js +0 -74
- package/bin/mm.conf +0 -48
- package/bin/static/404.html +0 -52
- package/bin/static/README.md +0 -1
- package/bin/static/css/font-awesome.min.css +0 -7
- package/bin/static/css/mm_base.css +0 -220
- package/bin/static/css/mm_common.css +0 -518
- package/bin/static/css/mm_component.css +0 -307
- package/bin/static/css/mm_expand.css +0 -634
- package/bin/static/css/mm_theme.css +0 -291
- package/bin/static/css/new_file.css +0 -79
- package/bin/static/css/swiper.min.css +0 -12
- package/bin/static/favicon.ico +0 -0
- package/bin/static/font/FontAwesome.otf +0 -0
- package/bin/static/font/HelveticaNeue.eot +0 -0
- package/bin/static/font/HelveticaNeue.otf +0 -0
- package/bin/static/font/HelveticaNeue.svg +0 -1273
- package/bin/static/font/HelveticaNeue.woff +0 -0
- package/bin/static/font/HelveticaNeue.woff2 +0 -0
- package/bin/static/font/fontawesome-webfont.eot +0 -0
- package/bin/static/font/fontawesome-webfont.svg +0 -2671
- package/bin/static/font/fontawesome-webfont.ttf +0 -0
- package/bin/static/font/fontawesome-webfont.woff +0 -0
- package/bin/static/font/fontawesome-webfont.woff2 +0 -0
- package/bin/static/h5.html +0 -325
- package/bin/static/highlight/highlight.pack.js +0 -2
- package/bin/static/highlight/styles/a11y-dark.css +0 -99
- package/bin/static/highlight/styles/a11y-light.css +0 -99
- package/bin/static/highlight/styles/agate.css +0 -108
- package/bin/static/highlight/styles/an-old-hope.css +0 -89
- package/bin/static/highlight/styles/androidstudio.css +0 -66
- package/bin/static/highlight/styles/arduino-light.css +0 -88
- package/bin/static/highlight/styles/arta.css +0 -73
- package/bin/static/highlight/styles/ascetic.css +0 -45
- package/bin/static/highlight/styles/atelier-cave-dark.css +0 -83
- package/bin/static/highlight/styles/atelier-cave-light.css +0 -85
- package/bin/static/highlight/styles/atelier-dune-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-dune-light.css +0 -69
- package/bin/static/highlight/styles/atelier-estuary-dark.css +0 -84
- package/bin/static/highlight/styles/atelier-estuary-light.css +0 -84
- package/bin/static/highlight/styles/atelier-forest-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-forest-light.css +0 -69
- package/bin/static/highlight/styles/atelier-heath-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-heath-light.css +0 -69
- package/bin/static/highlight/styles/atelier-lakeside-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-lakeside-light.css +0 -69
- package/bin/static/highlight/styles/atelier-plateau-dark.css +0 -84
- package/bin/static/highlight/styles/atelier-plateau-light.css +0 -84
- package/bin/static/highlight/styles/atelier-savanna-dark.css +0 -84
- package/bin/static/highlight/styles/atelier-savanna-light.css +0 -84
- package/bin/static/highlight/styles/atelier-seaside-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-seaside-light.css +0 -69
- package/bin/static/highlight/styles/atelier-sulphurpool-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-sulphurpool-light.css +0 -69
- package/bin/static/highlight/styles/atom-one-dark-reasonable.css +0 -77
- package/bin/static/highlight/styles/atom-one-dark.css +0 -96
- package/bin/static/highlight/styles/atom-one-light.css +0 -96
- package/bin/static/highlight/styles/brown-paper.css +0 -64
- package/bin/static/highlight/styles/brown-papersq.png +0 -0
- package/bin/static/highlight/styles/codepen-embed.css +0 -60
- package/bin/static/highlight/styles/color-brewer.css +0 -71
- package/bin/static/highlight/styles/darcula.css +0 -77
- package/bin/static/highlight/styles/dark.css +0 -63
- package/bin/static/highlight/styles/darkula.css +0 -6
- package/bin/static/highlight/styles/default.css +0 -99
- package/bin/static/highlight/styles/docco.css +0 -97
- package/bin/static/highlight/styles/dracula.css +0 -76
- package/bin/static/highlight/styles/far.css +0 -71
- package/bin/static/highlight/styles/foundation.css +0 -88
- package/bin/static/highlight/styles/github-gist.css +0 -79
- package/bin/static/highlight/styles/github.css +0 -99
- package/bin/static/highlight/styles/gml.css +0 -78
- package/bin/static/highlight/styles/googlecode.css +0 -89
- package/bin/static/highlight/styles/grayscale.css +0 -101
- package/bin/static/highlight/styles/gruvbox-dark.css +0 -108
- package/bin/static/highlight/styles/gruvbox-light.css +0 -108
- package/bin/static/highlight/styles/hopscotch.css +0 -83
- package/bin/static/highlight/styles/hybrid.css +0 -102
- package/bin/static/highlight/styles/idea.css +0 -97
- package/bin/static/highlight/styles/ir-black.css +0 -73
- package/bin/static/highlight/styles/isbl-editor-dark.css +0 -112
- package/bin/static/highlight/styles/isbl-editor-light.css +0 -112
- package/bin/static/highlight/styles/kimbie.dark.css +0 -74
- package/bin/static/highlight/styles/kimbie.light.css +0 -74
- package/bin/static/highlight/styles/lightfair.css +0 -87
- package/bin/static/highlight/styles/magula.css +0 -70
- package/bin/static/highlight/styles/mono-blue.css +0 -59
- package/bin/static/highlight/styles/monokai-sublime.css +0 -83
- package/bin/static/highlight/styles/monokai.css +0 -70
- package/bin/static/highlight/styles/nord.css +0 -309
- package/bin/static/highlight/styles/obsidian.css +0 -88
- package/bin/static/highlight/styles/ocean.css +0 -74
- package/bin/static/highlight/styles/paraiso-dark.css +0 -72
- package/bin/static/highlight/styles/paraiso-light.css +0 -72
- package/bin/static/highlight/styles/pojoaque.css +0 -83
- package/bin/static/highlight/styles/pojoaque.jpg +0 -0
- package/bin/static/highlight/styles/purebasic.css +0 -96
- package/bin/static/highlight/styles/qtcreator_dark.css +0 -83
- package/bin/static/highlight/styles/qtcreator_light.css +0 -83
- package/bin/static/highlight/styles/railscasts.css +0 -106
- package/bin/static/highlight/styles/rainbow.css +0 -85
- package/bin/static/highlight/styles/routeros.css +0 -108
- package/bin/static/highlight/styles/school-book.css +0 -69
- package/bin/static/highlight/styles/school-book.png +0 -0
- package/bin/static/highlight/styles/shades-of-purple.css +0 -97
- package/bin/static/highlight/styles/solarized-dark.css +0 -84
- package/bin/static/highlight/styles/solarized-light.css +0 -84
- package/bin/static/highlight/styles/sunburst.css +0 -102
- package/bin/static/highlight/styles/tomorrow-night-blue.css +0 -75
- package/bin/static/highlight/styles/tomorrow-night-bright.css +0 -74
- package/bin/static/highlight/styles/tomorrow-night-eighties.css +0 -74
- package/bin/static/highlight/styles/tomorrow-night.css +0 -75
- package/bin/static/highlight/styles/tomorrow.css +0 -72
- package/bin/static/highlight/styles/vs.css +0 -68
- package/bin/static/highlight/styles/vs2015.css +0 -115
- package/bin/static/highlight/styles/xcode.css +0 -104
- package/bin/static/highlight/styles/xt256.css +0 -92
- package/bin/static/highlight/styles/zenburn.css +0 -80
- package/bin/static/highlight/vue-highlight.js +0 -29
- package/bin/static/ifame.html +0 -24
- package/bin/static/img/add.png +0 -0
- package/bin/static/img/avatar.png +0 -0
- package/bin/static/img/banner_2.png +0 -0
- package/bin/static/img/default.png +0 -0
- package/bin/static/img/loading.svg +0 -1
- package/bin/static/img/logo.png +0 -0
- package/bin/static/img/logo1.png +0 -0
- package/bin/static/img/logo_gray.png +0 -0
- package/bin/static/img/logo_round.png +0 -0
- package/bin/static/img/mm.ico +0 -0
- package/bin/static/img/mm.jpg +0 -0
- package/bin/static/img/select.png +0 -0
- package/bin/static/img/web.png +0 -0
- package/bin/static/index.html +0 -12
- package/bin/static/js/clipboard.min.js +0 -257
- package/bin/static/js/css.min.js +0 -1
- package/bin/static/js/echarts.js +0 -22
- package/bin/static/js/html5.min.js +0 -1
- package/bin/static/js/jquery.lazyload.min.js +0 -2
- package/bin/static/js/jquery.min.js +0 -4189
- package/bin/static/js/jquery.scrollstop.min.js +0 -2
- package/bin/static/js/mm-requirejs-vue.js +0 -283
- package/bin/static/js/mm_check.js +0 -490
- package/bin/static/js/mm_flexble.js +0 -112
- package/bin/static/js/mm_picker.js +0 -1417
- package/bin/static/js/mm_pinyinlite.js +0 -873
- package/bin/static/js/mm_sdk.js +0 -2841
- package/bin/static/js/mm_ui_expand.js +0 -468
- package/bin/static/js/mm_vue.js +0 -376
- package/bin/static/js/mm_vue_ui.js +0 -2375
- package/bin/static/js/mm_websocket.js +0 -145
- package/bin/static/js/require.js +0 -5
- package/bin/static/js/sortable.min.js +0 -3
- package/bin/static/js/swiper.min.js +0 -13
- package/bin/static/js/text.min.js +0 -1
- package/bin/static/js/vue-router.min.js +0 -6
- package/bin/static/js/vue.js +0 -12338
- package/bin/static/js/vuedraggable.min.js +0 -2
- package/bin/static/js/vuex.min.js +0 -6
- package/bin/static/src/components/bar/mm_action.vue +0 -19
- package/bin/static/src/components/bar/mm_buy.vue +0 -19
- package/bin/static/src/components/bar/mm_chat.vue +0 -18
- package/bin/static/src/components/bar/mm_count.vue +0 -18
- package/bin/static/src/components/bar/mm_filter.vue +0 -18
- package/bin/static/src/components/bar/mm_search.vue +0 -18
- package/bin/static/src/components/bar/mm_sort.vue +0 -18
- package/bin/static/src/components/bar/mm_tag.vue +0 -18
- package/bin/static/src/components/bar/mm_title.vue +0 -19
- package/bin/static/src/components/content/mm_pre.vue +0 -70
- package/bin/static/src/components/expand/mm_drag.vue +0 -39
- package/bin/static/src/components/item/mm_article.vue +0 -115
- package/bin/static/src/components/item/mm_base.vue +0 -26
- package/bin/static/src/components/item/mm_contact.vue +0 -25
- package/bin/static/src/components/item/mm_goods.vue +0 -23
- package/bin/static/src/components/item/mm_img.vue +0 -21
- package/bin/static/src/components/item/mm_media.vue +0 -18
- package/bin/static/src/components/item/mm_message.vue +0 -18
- package/bin/static/src/components/item/mm_music.vue +0 -95
- package/bin/static/src/components/item/mm_news.vue +0 -22
- package/bin/static/src/components/item/mm_number.vue +0 -26
- package/bin/static/src/components/item/mm_question.vue +0 -35
- package/bin/static/src/components/item/mm_user.vue +0 -22
- package/bin/static/src/components/item/mm_video.vue +0 -95
- package/bin/static/src/components/slide/mm_slide_card.vue +0 -64
- package/bin/static/src/components/slide/mm_slide_img.vue +0 -47
- package/bin/static/src/components/slide/mm_slide_page.vue +0 -8
- package/bin/static/src/components/slide/mm_slide_text.vue +0 -54
- package/bin/static/src/main.js +0 -84
- package/bin/static/src/mixins/form.js +0 -223
- package/bin/static/src/mixins/item.js +0 -242
- package/bin/static/src/mixins/list.js +0 -244
- package/bin/static/src/mixins/page.js +0 -1011
- package/bin/static/src/mm_component.js +0 -74
- package/bin/static/src/router.js +0 -72
- package/bin/static/src/store/user.js +0 -75
- package/bin/static/src/store/web.js +0 -50
- package/bin/static/user/1/number_info.xlsx +0 -0
- package/bin/static/w3c.html +0 -94
- package/init.js +0 -55
- package/update.md +0 -1
- /package/{bin → core}/com/api/README.md +0 -0
- /package/{bin → core}/com/api/rpc.js +0 -0
- /package/{bin → core}/com/db/README.md +0 -0
- /package/{bin → core}/com/event/README.md +0 -0
- /package/{bin/com/socket → core/com/mqtt}/README.md +0 -0
- /package/{bin → core}/com/nav/README.md +0 -0
- /package/{bin → core}/com/nav/config.tpl.json +0 -0
- /package/{bin → core}/com/param/README.md +0 -0
- /package/{bin → core}/com/param/index.js +0 -0
- /package/{bin → core}/com/param/script.js +0 -0
- /package/{bin → core}/com/param/test.js +0 -0
- /package/{bin → core}/com/plugin/README.md +0 -0
- /package/{bin → core}/com/plugin/script.js +0 -0
- /package/{bin → core}/com/sql/README.md +0 -0
- /package/{bin → core}/com/sql/index.js +0 -0
- /package/{bin → core}/com/sql/script.js +0 -0
- /package/{bin → core}/com/static/README.md +0 -0
- /package/{bin → core}/com/static/script.js +0 -0
- /package/{bin → core}/com/task/README.md +0 -0
- /package/{bin/rps.bat → rps.bat} +0 -0
- /package/{bin/tps.bat → tps.bat} +0 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<main id="${id}">
|
|
3
|
+
<mm_warp>
|
|
4
|
+
<mm_container>
|
|
5
|
+
<mm_row>
|
|
6
|
+
<mm_col class="col-12">
|
|
7
|
+
<mm_card :class="{ 'hide_filter': !show_filter }">
|
|
8
|
+
<div class="card_head arrow" @click="show_filter = !show_filter">
|
|
9
|
+
<h5>${api.title}</h5>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="card_body">
|
|
12
|
+
<mm_form class="bar_filter">
|
|
13
|
+
<div class="title">
|
|
14
|
+
<h5><span>筛选条件</span></h5>
|
|
15
|
+
</div>
|
|
16
|
+
<mm_list :col="3">
|
|
17
|
+
<!--{loop param.list v idx}-->
|
|
18
|
+
<!--{if(v.name === 'keyword')}-->
|
|
19
|
+
<mm_item>
|
|
20
|
+
<control_input v-model="query.keyword" title="${v.title}" desc="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}"
|
|
21
|
+
/>
|
|
22
|
+
</mm_item>
|
|
23
|
+
<!--{/if}-->
|
|
24
|
+
<!--{/loop}-->
|
|
25
|
+
<!--{loop field v idx}-->
|
|
26
|
+
<!--{if(v.show.search)}-->
|
|
27
|
+
<!--{if(v.show.search === "input")}-->
|
|
28
|
+
<mm_item>
|
|
29
|
+
<control_input v-model="query.${v.name}" title="${v.title}" @blur="search()" />
|
|
30
|
+
</mm_item>
|
|
31
|
+
<!--{else if(v.show.search === "select")}-->
|
|
32
|
+
<!--{if(v.format.table)}-->
|
|
33
|
+
<mm_item>
|
|
34
|
+
<!--{if(v.format.key.endWith('_id') !== -1)}-->
|
|
35
|
+
<control_select type="list" v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" @change="search()" />
|
|
36
|
+
<!--{else}-->
|
|
37
|
+
<control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')"
|
|
38
|
+
@change="search()" />
|
|
39
|
+
<!--{/if}-->
|
|
40
|
+
</mm_item>
|
|
41
|
+
<!--{else if(v.format.key.indexOf('user_id') !== -1)}-->
|
|
42
|
+
<mm_item>
|
|
43
|
+
<control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label})" @change="search()" />
|
|
44
|
+
</mm_item>
|
|
45
|
+
<!--{else}-->
|
|
46
|
+
<mm_item>
|
|
47
|
+
<control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label})" @change="search()" />
|
|
48
|
+
</mm_item>
|
|
49
|
+
<!--{/if}-->
|
|
50
|
+
<!--{/if}-->
|
|
51
|
+
<!--{/if}-->
|
|
52
|
+
<!--{/loop}-->
|
|
53
|
+
<mm_item>
|
|
54
|
+
<mm_btn class="btn_primary-x" type="reset" @click.native="reset();">重置</mm_btn>
|
|
55
|
+
</mm_item>
|
|
56
|
+
</mm_list>
|
|
57
|
+
</mm_form>
|
|
58
|
+
<div class="bar_action">
|
|
59
|
+
<h5><span>操作</span></h5>
|
|
60
|
+
<div class="btns">
|
|
61
|
+
<mm_btn class="btn_primary-x" url="./${name}_form?">添加</mm_btn>
|
|
62
|
+
<mm_btn @click.native="show = true" class="btn_primary-x" v-bind:class="{ 'disabled': !selects }">批量修改</mm_btn>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="btn_small">
|
|
65
|
+
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
66
|
+
<mm_btn class="btn_default-x" @click.native="export_db()" v-if="url_export">导出</mm_btn>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<mm_table type="2">
|
|
70
|
+
<thead class="table-sm">
|
|
71
|
+
<tr>
|
|
72
|
+
<th class="th_id"><span>#</span></th>
|
|
73
|
+
<!--{loop field v idx}-->
|
|
74
|
+
<!--{if(v.name !== sql.key)}-->
|
|
75
|
+
<th class="th_${v.name}">
|
|
76
|
+
<control_reverse title="${v.title}" v-model="query.orderby" field="${v.name}" :func="search"></control_reverse>
|
|
77
|
+
</th>
|
|
78
|
+
<!--{/if}-->
|
|
79
|
+
<!--{/loop}-->
|
|
80
|
+
<th class="th_handle"><span>操作</span></th>
|
|
81
|
+
</tr>
|
|
82
|
+
</thead>
|
|
83
|
+
<tbody>
|
|
84
|
+
<!-- <draggable v-model="list" tag="tbody" @change="sort_change"> -->
|
|
85
|
+
<tr v-for="(o, idx) in list" :key="idx" :class="{'active': select == idx}" @click="selected(idx)">
|
|
86
|
+
<td>{{ o[field] }}</td>
|
|
87
|
+
<!--{loop field v idx}-->
|
|
88
|
+
<!--{if(v.show.table)}-->
|
|
89
|
+
<!--{if(v.name !== sql.key)}-->
|
|
90
|
+
<td>
|
|
91
|
+
<!--{if(v.dataType === 'tinyint')}-->
|
|
92
|
+
<control_switch v-model="o.${v.name}" @click.native="set(o)" />
|
|
93
|
+
<!--{else if(v.format)}-->
|
|
94
|
+
<!--{if(v.format.table)}-->
|
|
95
|
+
<span>{{ $get_name(${v.label}, o.${v.format.key}, '${v.format.id || v.format.key}', '${v.format.name}') }}</span>
|
|
96
|
+
<!--{else if(v.name == 'state' || v.name == 'status')}-->
|
|
97
|
+
<span v-bind:class="arr_color[o.${v.name}]">{{ ${v.label}[o.${v.name}] }}</span>
|
|
98
|
+
<!--{else}-->
|
|
99
|
+
<control_select v-model="o.${v.name}" :options="$to_kv(${v.label})" @change.native="set(o)" />
|
|
100
|
+
<!--{/if}-->
|
|
101
|
+
<!--{else if(v.name.indexOf('img') !== -1 || v.name.indexOf('icon') !== -1 || v.name === 'avatar')}-->
|
|
102
|
+
<img class="${v.name}" :src="o.${v.name}" alt="${v.title}" />
|
|
103
|
+
<!--{else if(v.dataType === 'date')}-->
|
|
104
|
+
<span>{{ $to_time(o.${v.name}, 'yyyy-MM-dd') }}</span>
|
|
105
|
+
<!--{else if(v.dataType === 'time')}-->
|
|
106
|
+
<span>{{ o.${v.name} }}</span>
|
|
107
|
+
<!--{else if(v.dataType === 'timestamp' || v.dataType === 'datetime')}-->
|
|
108
|
+
<span>{{ $to_time(o.${v.name}, 'yyyy-MM-dd hh:mm') }}</span>
|
|
109
|
+
<!--{else if(v.name === 'display' || v.name === 'orderby')}-->
|
|
110
|
+
<input class="input_display" v-model.number="o.${v.name}" @blur="set(o)" min="0" max="1000" />
|
|
111
|
+
<!--{else}-->
|
|
112
|
+
<control_input :auto="true" v-model="o.${v.name}" @blur="set(o)" />
|
|
113
|
+
<!--{/if}-->
|
|
114
|
+
</td>
|
|
115
|
+
<!--{/if}-->
|
|
116
|
+
<!--{/if}-->
|
|
117
|
+
<!--{/loop}-->
|
|
118
|
+
<td>
|
|
119
|
+
<mm_btn class="btn_primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
|
|
120
|
+
<mm_btn class="btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
|
|
121
|
+
</td>
|
|
122
|
+
</tr>
|
|
123
|
+
</tbody>
|
|
124
|
+
<!-- </draggable> -->
|
|
125
|
+
</mm_table>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="card_foot">
|
|
128
|
+
<div class="fl">
|
|
129
|
+
<control_select v-model="query.size" :options="$to_size()" @change="search()" />
|
|
130
|
+
</div>
|
|
131
|
+
<div class="fr">
|
|
132
|
+
<span class="mr">共 {{ count }} 条</span>
|
|
133
|
+
<span>当前</span>
|
|
134
|
+
<input type="number" class="pager_now" v-model.number="page_now" @blur="goTo(page_now)" @change="page_change" />
|
|
135
|
+
<span>/{{ page_count }}页</span>
|
|
136
|
+
</div>
|
|
137
|
+
<control_pager display="2" v-model="query.page" :count="count / query.size" :func="goTo" :icons="['首页', '上一页', '下一页', '尾页']"></control_pager>
|
|
138
|
+
</div>
|
|
139
|
+
</mm_card>
|
|
140
|
+
</mm_col>
|
|
141
|
+
</mm_row>
|
|
142
|
+
</mm_container>
|
|
143
|
+
</mm_warp>
|
|
144
|
+
<mm_modal v-model="show" mask="true">
|
|
145
|
+
<mm_card class="card">
|
|
146
|
+
<div class="card_head">
|
|
147
|
+
<h5>批量修改</h5>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="card_body pa">
|
|
150
|
+
<dl>
|
|
151
|
+
<!--{loop field v idx}-->
|
|
152
|
+
<!--{if(v.show.batch)}-->
|
|
153
|
+
<dt>${v.title}</dt>
|
|
154
|
+
<dd>
|
|
155
|
+
<!--{if(v.show.batch === "input")}-->
|
|
156
|
+
<control_input v-model="form.${v.name}" />
|
|
157
|
+
<!--{else if(v.show.batch === "select")}-->
|
|
158
|
+
<!--{if(v.format.table)}-->
|
|
159
|
+
<!--{if(v.format.key.endWith('_id') !== -1)}-->
|
|
160
|
+
<control_select type="list" v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
|
|
161
|
+
<!--{else}-->
|
|
162
|
+
<control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
|
|
163
|
+
<!--{/if}-->
|
|
164
|
+
<!--{else}-->
|
|
165
|
+
<control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label})" />
|
|
166
|
+
<!--{/if}-->
|
|
167
|
+
<!--{/if}-->
|
|
168
|
+
</dd>
|
|
169
|
+
<!--{/if}-->
|
|
170
|
+
<!--{/loop}-->
|
|
171
|
+
</dl>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="card_foot">
|
|
174
|
+
<div class="mm_group">
|
|
175
|
+
<button class="btn_default" type="reset" @click="show = false">取消</button>
|
|
176
|
+
<button class="btn_primary" type="button" @click="batchSet()">提交</button>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</mm_card>
|
|
180
|
+
</mm_modal>
|
|
181
|
+
</main>
|
|
182
|
+
</template>
|
|
183
|
+
|
|
184
|
+
<script>
|
|
185
|
+
import mixin from '/src/mixins/page.js';
|
|
186
|
+
|
|
187
|
+
export default {
|
|
188
|
+
mixins: [mixin],
|
|
189
|
+
data() {
|
|
190
|
+
return {
|
|
191
|
+
// 列表请求地址
|
|
192
|
+
url_get_list: "${api.path}",
|
|
193
|
+
url_del: "${api.path}?method=del&",
|
|
194
|
+
url_set: "${api.path}?method=set&",
|
|
195
|
+
url_import: "${api.path}?method=import&",
|
|
196
|
+
url_export: "${api.path}?method=export&",
|
|
197
|
+
field: "${sql.key}",
|
|
198
|
+
query_set: {
|
|
199
|
+
"${sql.key}": ""
|
|
200
|
+
},
|
|
201
|
+
// 查询条件
|
|
202
|
+
query: {
|
|
203
|
+
//页码
|
|
204
|
+
page: 1,
|
|
205
|
+
//页面大小
|
|
206
|
+
size: 10,
|
|
207
|
+
/*[loop js.query v idx]*/
|
|
208
|
+
// ${' ' + v.title}
|
|
209
|
+
/*[if v.type === 'number' && !v.select]*/
|
|
210
|
+
'${v.name}': 0,
|
|
211
|
+
/*[else]*/
|
|
212
|
+
'${v.name}': '',
|
|
213
|
+
/*[/if]*/
|
|
214
|
+
/*[/loop]*/
|
|
215
|
+
//排序
|
|
216
|
+
orderby: ""
|
|
217
|
+
},
|
|
218
|
+
form: {},
|
|
219
|
+
//颜色
|
|
220
|
+
arr_color: ['', '', 'font_yellow', 'font_success', 'font_warning', 'font_primary', 'font_info', 'font_default'],
|
|
221
|
+
/*[loop js.data v idx]*/
|
|
222
|
+
// ${' ' + v.title}
|
|
223
|
+
'${v.name}': ${@JSON.stringify(v.value)},
|
|
224
|
+
/*[/loop]*/
|
|
225
|
+
// 视图模型
|
|
226
|
+
vm: {}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
methods: {
|
|
230
|
+
/*[loop js.data v idx]*/
|
|
231
|
+
/*[if(v.path)]*/
|
|
232
|
+
/**
|
|
233
|
+
* 获取 ${v.title}
|
|
234
|
+
* @param {query} 查询条件
|
|
235
|
+
*/
|
|
236
|
+
get_ /*[v.basename]*/(query) {
|
|
237
|
+
var _this = this;
|
|
238
|
+
if (!query) {
|
|
239
|
+
query = {
|
|
240
|
+
field: "${v.id},${v.field}${v.father_id ? ',' + v.father_id : '' }${v.title_name ? ',title' : '' }"
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
this.$get('~${v.path}', query, function(json) {
|
|
244
|
+
if (json.result) {
|
|
245
|
+
_this /*['.' + v.name]*/ .clear();
|
|
246
|
+
_this /*['.' + v.name]*/ .addList(json.result.list)
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
},
|
|
250
|
+
/*[/if]*/
|
|
251
|
+
/*[/loop]*/
|
|
252
|
+
},
|
|
253
|
+
created() {
|
|
254
|
+
/*[loop js.data v idx]*/
|
|
255
|
+
/*[if(v.path)]*/
|
|
256
|
+
// 获取 ${v.title}
|
|
257
|
+
this.get_ /*[v.basename]*/();
|
|
258
|
+
/*[/if]*/
|
|
259
|
+
/*[/loop]*/
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
</script>
|
|
263
|
+
|
|
264
|
+
<style>
|
|
265
|
+
</style>
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<main id="${id}">
|
|
3
|
+
<mm_warp>
|
|
4
|
+
<mm_container>
|
|
5
|
+
<mm_row>
|
|
6
|
+
<mm_col class="col-12">
|
|
7
|
+
<mm_card :class="{ 'hide_filter': !show_filter }">
|
|
8
|
+
<div class="card_head arrow" @click="show_filter = !show_filter">
|
|
9
|
+
<h5>${api.title}</h5>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="card_body">
|
|
12
|
+
<mm_form class="bar_filter">
|
|
13
|
+
<div class="title">
|
|
14
|
+
<h5><span>筛选条件</span></h5>
|
|
15
|
+
</div>
|
|
16
|
+
<mm_list :col="3">
|
|
17
|
+
<!--{loop param.list v idx}-->
|
|
18
|
+
<!--{if(v.name === 'keyword')}-->
|
|
19
|
+
<mm_item>
|
|
20
|
+
<control_input v-model="query.keyword" title="${v.title}" desc="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}"
|
|
21
|
+
/>
|
|
22
|
+
</mm_item>
|
|
23
|
+
<!--{/if}-->
|
|
24
|
+
<!--{/loop}-->
|
|
25
|
+
<!--{loop field v idx}-->
|
|
26
|
+
<!--{if(v.show.search)}-->
|
|
27
|
+
<!--{if(v.show.search === "input")}-->
|
|
28
|
+
<mm_item>
|
|
29
|
+
<control_input v-model="query.${v.name}" title="${v.title}" @blur="search()" />
|
|
30
|
+
</mm_item>
|
|
31
|
+
<!--{else if(v.show.search === "select")}-->
|
|
32
|
+
<!--{if(v.format.table)}-->
|
|
33
|
+
<mm_item>
|
|
34
|
+
<!--{if(v.format.key.endWith('_id') !== -1)}-->
|
|
35
|
+
<control_select type="list" v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" @change="search()" />
|
|
36
|
+
<!--{else}-->
|
|
37
|
+
<control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')"
|
|
38
|
+
@change="search()" />
|
|
39
|
+
<!--{/if}-->
|
|
40
|
+
</mm_item>
|
|
41
|
+
<!--{else if(v.format.key.indexOf('user_id') !== -1)}-->
|
|
42
|
+
<mm_item>
|
|
43
|
+
<control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label})" @change="search()" />
|
|
44
|
+
</mm_item>
|
|
45
|
+
<!--{else}-->
|
|
46
|
+
<mm_item>
|
|
47
|
+
<control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label})" @change="search()" />
|
|
48
|
+
</mm_item>
|
|
49
|
+
<!--{/if}-->
|
|
50
|
+
<!--{/if}-->
|
|
51
|
+
<!--{/if}-->
|
|
52
|
+
<!--{/loop}-->
|
|
53
|
+
<mm_item>
|
|
54
|
+
<mm_btn class="btn_primary-x" type="reset" @click.native="reset();">重置</mm_btn>
|
|
55
|
+
</mm_item>
|
|
56
|
+
</mm_list>
|
|
57
|
+
</mm_form>
|
|
58
|
+
<div class="bar_action">
|
|
59
|
+
<h5><span>操作</span></h5>
|
|
60
|
+
<div class="btns">
|
|
61
|
+
<mm_btn class="btn_primary-x" url="./${name}_form?">添加</mm_btn>
|
|
62
|
+
<mm_btn @click.native="show = true" class="btn_primary-x" v-bind:class="{ 'disabled': !selects }">批量修改</mm_btn>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="btn_small">
|
|
65
|
+
<control_file class="btn_default-x" type="excel" :func="import_db" v-if="url_import"></control_file>
|
|
66
|
+
<mm_btn class="btn_default-x" @click.native="export_db()" v-if="url_export">导出</mm_btn>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<mm_table type="3">
|
|
70
|
+
<thead class="table-sm">
|
|
71
|
+
<tr>
|
|
72
|
+
<th class="th_open"></th>
|
|
73
|
+
<th class="th_selected"><input type="checkbox" :checked="select_state" @click="select_all()" /></th>
|
|
74
|
+
<th class="th_id"><span>#</span></th>
|
|
75
|
+
<!--{loop field v idx}-->
|
|
76
|
+
<!--{if(v.show.table)}-->
|
|
77
|
+
<!--{if(v.name !== sql.key)}-->
|
|
78
|
+
<th class="th_${v.name}">
|
|
79
|
+
<span>${v.title}</span>
|
|
80
|
+
</th>
|
|
81
|
+
<!--{/if}-->
|
|
82
|
+
<!--{/if}-->
|
|
83
|
+
<!--{/loop}-->
|
|
84
|
+
<th class="th_handle"><span>操作</span></th>
|
|
85
|
+
</tr>
|
|
86
|
+
</thead>
|
|
87
|
+
<tbody>
|
|
88
|
+
<!-- <draggable v-model="list" tag="tbody" @change="sort_change"> -->
|
|
89
|
+
<tr v-for="(o, idx) in list_new" :key="idx" :class="{'active': select == idx, sub: o[father_id], open: opens_has(o[field]), no_sub: !opens_has_sub(o[field]) }"
|
|
90
|
+
@click="selected(idx)">
|
|
91
|
+
<th class="th_open"><button class="btn_open" :style="'margin-left:' + (1.5 * opens_lv(o[father_id])) + 'rem;'"
|
|
92
|
+
@click="opens_change(o[field])"><i class="fa-caret-right"></i></button></th>
|
|
93
|
+
<th class="th_selected"><input type="checkbox" :checked="select_has(o[field])" @click="select_change(o[field])" /></th>
|
|
94
|
+
<td>{{ o[field] }}</td>
|
|
95
|
+
<!--{loop field v idx}-->
|
|
96
|
+
<!--{if(v.show.table)}-->
|
|
97
|
+
<!--{if(v.name !== sql.key)}-->
|
|
98
|
+
<td>
|
|
99
|
+
<!--{if(v.dataType === 'tinyint')}-->
|
|
100
|
+
<control_switch v-model="o.${v.name}" @click.native="set(o)" />
|
|
101
|
+
<!--{else if(v.format)}-->
|
|
102
|
+
<!--{if(v.format.table)}-->
|
|
103
|
+
<span>{{ $get_name(${v.label}, o.${v.format.key}, '${v.format.id || v.format.key}', '${v.format.name}') }}</span>
|
|
104
|
+
<!--{else if(v.name == 'state' || v.name == 'status')}-->
|
|
105
|
+
<span v-bind:class="arr_color[o.${v.name}]">{{ ${v.label}[o.${v.name}] }}</span>
|
|
106
|
+
<!--{else}-->
|
|
107
|
+
<span>{{ ${v.label}[o.${v.name}] }}</span>
|
|
108
|
+
<!--{/if}-->
|
|
109
|
+
<!--{else if(v.name.indexOf('img') !== -1 || v.name.indexOf('icon') !== -1 || v.name === 'avatar')}-->
|
|
110
|
+
<img class="${v.name}" :src="o.${v.name}" alt="${v.title}" />
|
|
111
|
+
<!--{else if(v.dataType === 'date')}-->
|
|
112
|
+
<span>{{ $to_time(o.${v.name}, 'yyyy-MM-dd') }}</span>
|
|
113
|
+
<!--{else if(v.dataType === 'time')}-->
|
|
114
|
+
<span>{{ o.${v.name} }}</span>
|
|
115
|
+
<!--{else if(v.dataType === 'timestamp' || v.dataType === 'datetime')}-->
|
|
116
|
+
<span>{{ $to_time(o.${v.name}, 'yyyy-MM-dd hh:mm') }}</span>
|
|
117
|
+
<!--{else if(v.name === 'display' || v.name === 'orderby')}-->
|
|
118
|
+
<input class="input_display" v-model.number="o.${v.name}" @blur="set(o)" min="0" max="1000" />
|
|
119
|
+
<!--{else}-->
|
|
120
|
+
<control_input :auto="true" v-model="o.${v.name}" @blur="set(o)" />
|
|
121
|
+
<!--{/if}-->
|
|
122
|
+
</td>
|
|
123
|
+
<!--{/if}-->
|
|
124
|
+
<!--{/if}-->
|
|
125
|
+
<!--{/loop}-->
|
|
126
|
+
<td>
|
|
127
|
+
<mm_btn class="btn_primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
|
|
128
|
+
<mm_btn class="btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
|
|
129
|
+
</td>
|
|
130
|
+
</tr>
|
|
131
|
+
</tbody>
|
|
132
|
+
<!-- </draggable> -->
|
|
133
|
+
|
|
134
|
+
<template v-slot:right>
|
|
135
|
+
<thead class="table-sm">
|
|
136
|
+
<tr>
|
|
137
|
+
<th class="th_handle"><span>操作</span></th>
|
|
138
|
+
</tr>
|
|
139
|
+
</thead>
|
|
140
|
+
<tbody>
|
|
141
|
+
<tr v-for="(o, idx) in list_new" :key="idx" :class="{'active': select == idx, sub: o[father_id], open: opens_has(o[field]), no_sub: !opens_has_sub(o[field]) }"
|
|
142
|
+
@click="selected(idx)">
|
|
143
|
+
<td>
|
|
144
|
+
<mm_btn class="btn_primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
|
|
145
|
+
<mm_btn class="btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
|
|
146
|
+
</td>
|
|
147
|
+
</tr>
|
|
148
|
+
</tbody>
|
|
149
|
+
</template>
|
|
150
|
+
</mm_table>
|
|
151
|
+
</div>
|
|
152
|
+
</mm_card>
|
|
153
|
+
</mm_col>
|
|
154
|
+
</mm_row>
|
|
155
|
+
</mm_container>
|
|
156
|
+
</mm_warp>
|
|
157
|
+
<mm_modal v-model="show" mask="true">
|
|
158
|
+
<mm_card class="card">
|
|
159
|
+
<div class="card_head">
|
|
160
|
+
<h5>批量修改</h5>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="card_body pa">
|
|
163
|
+
<dl>
|
|
164
|
+
<!--{loop field v idx}-->
|
|
165
|
+
<!--{if(v.show.batch)}-->
|
|
166
|
+
<dt>${v.title}</dt>
|
|
167
|
+
<dd>
|
|
168
|
+
<!--{if(v.show.batch === "input")}-->
|
|
169
|
+
<control_input v-model="form.${v.name}" />
|
|
170
|
+
<!--{else if(v.show.batch === "select")}-->
|
|
171
|
+
<!--{if(v.format.table)}-->
|
|
172
|
+
<!--{if(v.format.key.endWith('_id') !== -1)}-->
|
|
173
|
+
<control_select type="list" v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
|
|
174
|
+
<!--{else}-->
|
|
175
|
+
<control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
|
|
176
|
+
<!--{/if}-->
|
|
177
|
+
<!--{else}-->
|
|
178
|
+
<control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label})" />
|
|
179
|
+
<!--{/if}-->
|
|
180
|
+
<!--{/if}-->
|
|
181
|
+
</dd>
|
|
182
|
+
<!--{/if}-->
|
|
183
|
+
<!--{/loop}-->
|
|
184
|
+
</dl>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="card_foot">
|
|
187
|
+
<div class="mm_group">
|
|
188
|
+
<button class="btn_default" type="reset" @click="show = false">取消</button>
|
|
189
|
+
<button class="btn_primary" type="button" @click="batchSet()">提交</button>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</mm_card>
|
|
193
|
+
</mm_modal>
|
|
194
|
+
</main>
|
|
195
|
+
</template>
|
|
196
|
+
|
|
197
|
+
<script>
|
|
198
|
+
import mixin from '/src/mixins/page.js';
|
|
199
|
+
|
|
200
|
+
export default {
|
|
201
|
+
mixins: [mixin],
|
|
202
|
+
data() {
|
|
203
|
+
return {
|
|
204
|
+
// 列表请求地址
|
|
205
|
+
url_get_list: "${api.path}",
|
|
206
|
+
url_del: "${api.path}?method=del&",
|
|
207
|
+
url_set: "${api.path}?method=set&",
|
|
208
|
+
url_import: "${api.path}?method=import&",
|
|
209
|
+
url_export: "${api.path}?method=export&",
|
|
210
|
+
field: "${sql.key}",
|
|
211
|
+
query_set: {
|
|
212
|
+
"${sql.key}": ""
|
|
213
|
+
},
|
|
214
|
+
// 查询条件
|
|
215
|
+
query: {
|
|
216
|
+
//排序
|
|
217
|
+
orderby: "",
|
|
218
|
+
// 上级分类ID
|
|
219
|
+
father_id: '',
|
|
220
|
+
// 关键词
|
|
221
|
+
keyword: ''
|
|
222
|
+
},
|
|
223
|
+
form: {},
|
|
224
|
+
//颜色
|
|
225
|
+
arr_color: ['', '', 'font_yellow', 'font_success', 'font_warning', 'font_primary', 'font_info', 'font_default'],
|
|
226
|
+
/*[loop js.data v idx]*/
|
|
227
|
+
// ${' ' + v.title}
|
|
228
|
+
'${v.name}': ${@JSON.stringify(v.value)},
|
|
229
|
+
/*[/loop]*/
|
|
230
|
+
// 视图模型
|
|
231
|
+
vm: {}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
methods: {
|
|
235
|
+
/*[loop js.data v idx]*/
|
|
236
|
+
/*[if(v.path)]*/
|
|
237
|
+
/**
|
|
238
|
+
* 获取 ${v.title}
|
|
239
|
+
* @param {query} 查询条件
|
|
240
|
+
*/
|
|
241
|
+
get_ /*[v.basename]*/(query) {
|
|
242
|
+
var _this = this;
|
|
243
|
+
if (!query) {
|
|
244
|
+
query = {
|
|
245
|
+
field: "${v.id},${v.field}${v.father_id ? ',' + v.father_id : '' }${v.title_name ? ',title' : '' }"
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
this.$get('~${v.path}', query, function(json) {
|
|
249
|
+
if (json.result) {
|
|
250
|
+
_this /*['.' + v.name]*/ .clear();
|
|
251
|
+
_this /*['.' + v.name]*/ .addList(json.result.list)
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
/*[/if]*/
|
|
256
|
+
/*[/loop]*/
|
|
257
|
+
/**
|
|
258
|
+
* 获取列表之前
|
|
259
|
+
* @param {Object} param 参数
|
|
260
|
+
*/
|
|
261
|
+
get_list_before(param){
|
|
262
|
+
delete param.page;
|
|
263
|
+
param.size = "0";
|
|
264
|
+
return param;
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
created() {
|
|
268
|
+
/*[loop js.data v idx]*/
|
|
269
|
+
/*[if(v.path)]*/
|
|
270
|
+
// 获取 ${v.title}
|
|
271
|
+
this.get_/*[v.basename]*/();
|
|
272
|
+
/*[/if]*/
|
|
273
|
+
/*[/loop]*/
|
|
274
|
+
},
|
|
275
|
+
computed: {
|
|
276
|
+
list_new() {
|
|
277
|
+
var list = [];
|
|
278
|
+
var {
|
|
279
|
+
keyword,
|
|
280
|
+
father_id
|
|
281
|
+
} = this.query;
|
|
282
|
+
|
|
283
|
+
if (keyword && father_id) {
|
|
284
|
+
return this.list.filter(function(o) {
|
|
285
|
+
return o.father_id == father_id && (o.title.indexOf(keyword) !== -1 || o.name.indexOf(
|
|
286
|
+
keyword) !== -1);
|
|
287
|
+
});
|
|
288
|
+
} else if (father_id) {
|
|
289
|
+
return this.list.filter(function(o) {
|
|
290
|
+
return o.father_id == father_id;
|
|
291
|
+
});
|
|
292
|
+
} else if (keyword) {
|
|
293
|
+
return this.list.filter(function(o) {
|
|
294
|
+
return o.title.indexOf(keyword) !== -1 || o.name.indexOf(keyword) !== -1;
|
|
295
|
+
});
|
|
296
|
+
} else {
|
|
297
|
+
var lt = this.list.toTree(this.field).toList();
|
|
298
|
+
var arr = this.opens;
|
|
299
|
+
for (var i = 0; i < lt.length; i++) {
|
|
300
|
+
var o = lt[i];
|
|
301
|
+
if (this.opens.indexOf(o[this.father_id]) !== -1) {
|
|
302
|
+
list.push(o);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return list;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
</script>
|
|
311
|
+
|
|
312
|
+
<style>
|
|
313
|
+
</style>
|