mm_os 2.8.7 → 2.8.8

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.
@@ -1,194 +1,194 @@
1
- <template>
2
- <main id="${id}">
3
- <mm_warp>
4
- <mm_container>
5
- <mm_row>
6
- <mm_col class="col-mm-12">
7
- <mm_card>
8
- <div class="card_head arrow">
9
- <h5>{{ form[field] ? '修改' : '创建' }}${api.title}</h5>
10
- </div>
11
- <div class="card_body">
12
- <mm_form>
13
- <dl>
14
- <!--{loop field v idx}-->
15
- <!--{if(v.show.form)}-->
16
- <!--{if(v.name !== sql.key)}-->
17
- <!--{if(v.required)}-->
18
- <dt class="required">${v.title}</dt>
19
- <!--{else}-->
20
- <dt>${v.title}</dt>
21
- <!--{/if}-->
22
- <!--{if(v.dataType === 'tinyint')}-->
23
- <dd>
24
- <control_switch v-model="form.${v.name}" />
25
- </dd>
26
- <!--{else if(v.format)}-->
27
- <!--{if(v.format.table)}-->
28
- <dd>
29
- <!--{if(v.format.key.endWith('_id') !== -1)}-->
30
- <control_select type="list" v-model="form.${v.name}"
31
- :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
32
- <!--{else}-->
33
- <control_select v-model="form.${v.name}"
34
- :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
35
- <!--{/if}-->
36
- </dd>
37
- <!--{else}-->
38
- <dd>
39
- <control_select v-model="form.${v.name}"
40
- :options="$to_kv(${v.label})" />
41
- </dd>
42
- <!--{/if}-->
43
- <!--{else if(v.dataType === 'date')}-->
44
- <dd>
45
- <mm_time v-model="form.${v.name}" type="date" />
46
- </dd>
47
- <!--{else if(v.dataType === 'time')}-->
48
- <dd>
49
- <mm_time v-model="form.${v.name}" type="time" />
50
- </dd>
51
- <!--{else if(v.dataType.indexOf('time') !== -1)}-->
52
- <dd>
53
- <mm_time v-model="form.${v.name}" type="datetime-local" />
54
- </dd>
55
- <!--{else if(v.name.indexOf('img') !== -1 || v.name.indexOf('icon') !== -1 || v.name === 'avatar')}-->
56
- <dd>
57
- <mm_upload_img width="10rem" height="10rem" name="${v.name}" type="text"
58
- v-model="form.${v.name}" />
59
- </dd>
60
- <!--{else if(v.name.indexOf('content') !== -1 || v.dataType.indexOf('longtext') !== -1)}-->
61
- <dd>
62
- <control_rich v-model="form.${v.name}"></control_rich>
63
- </dd>
64
- <!--{else if(v.dataType.indexOf('text') !== -1)}-->
65
- <dd>
66
- <control_textarea v-model="form.${v.name}" type="text"
67
- placeholder="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}">
68
- </control_textarea>
69
- </dd>
70
- <!--{else if(v.type === 'number' && v.name.indexOf('id') === -1)}-->
71
- <dd>
72
- <!--{if(v.number.range && v.number.range.length)}-->
73
- <control_number v-model="form.${v.name}" :min="${v.number.range[0]}" :max="${v.number.range[1]}" />
74
- <!--{else}-->
75
- <control_number v-model="form.${v.name}" :min="${v.number ? v.number.min : -99999999}" :max="${v.number ? v.number.max : 99999999}" />
76
- <!--{/if}-->
77
- </dd>
78
- <!--{else if(v.name === 'value')}-->
79
- <dd>
80
- <control_com v-if="form.control == 'number'" tag="number" v-model="form.${v.name}" />
81
- <control_com v-else-if="form.control == 'select'" tag="select" v-model="form.${v.name}" :mod="form.model" />
82
- <control_com v-else-if="form.control == 'checkbox' || form.control == 'radio'" :tag="form.control" v-model="form.${v.name}" :mod="form.model" />
83
- <mm_upload_img v-else-if="form.control == 'image'" width="10rem" height="10rem" name="${v.name}" type="text" v-model="form.${v.name}" />
84
- <control_file class="bg_white" v-else-if="form.control == 'file'" accept="*.*" @change="$setFile(form, $event, 'value', false)">
85
- <span>{{form.${v.name}}}</span><a class="btn" v-if="form.${v.name}.indexOf('/') === 0" :href="$url(form.${v.name})"><span>下载</span></a>
86
- </control_file>
87
- <control_com v-else :auto="true" :tag="form.control" v-model="form.${v.name}" />
88
- </dd>
89
- <!--{else}-->
90
- <dd>
91
- <!--{if(v.required)}-->
92
- <control_input v-model="form.${v.name}" :minlength="0"
93
- :maxlength="${v.string ? v.string.max : 0}"
94
- placeholder="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}"
95
- :required="true" />
96
- <!--{else}-->
97
- <control_input v-model="form.${v.name}" :minlength="0"
98
- :maxlength="${v.string ? v.string.max : 0}"
99
- placeholder="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}" />
100
- <!--{/if}-->
101
- </dd>
102
- <!--{/if}-->
103
- <!--{/if}-->
104
- <!--{/if}-->
105
- <!--{/loop}-->
106
- </dl>
107
- </mm_form>
108
- </div>
109
- <div class="card_foot">
110
- <div class="mm_group">
111
- <button class="btn_default" type="button" @click="cancel">返回</button>
112
- <button class="btn_primary" type="button" @click="submit()">提交</button>
113
- </div>
114
- </div>
115
- </mm_card>
116
- </mm_col>
117
- </mm_row>
118
- </mm_container>
119
- </mm_warp>
120
- </main>
121
- </template>
122
-
123
-
124
- <script>
125
- import control_com from '/src/components/control/control_com.vue';
126
- import mixin from '/src/mixins/page.js';
127
-
128
- export default {
129
- mixins: [mixin],
130
- components: {
131
- control_com
132
- },
133
- data() {
134
- return {
135
- url_add: "${api.path}?method=add",
136
- url_set: "${api.path}?method=set",
137
- url_get_obj: "${api.path}?method=get_obj",
138
- field: "${sql.key}",
139
- query: {
140
- "${sql.key}": 0
141
- },
142
- form: {
143
- /*[loop field v idx]*/
144
- // ${v.title}
145
- /*[if v.type === 'number']*/
146
- "${v.name}": ${v.default ? v.default : 0},
147
- /*[else]*/
148
- "${v.name}": '${v.default !== "0" ? v.default : ""}',
149
- /*[/if]*/
150
- /*[/loop]*/
151
- },
152
- /*[loop js.data v idx]*/
153
- // ${' ' + v.title}
154
- '${v.name}': ${@JSON.stringify(v.value)},
155
- /*[/loop]*/
156
- }
157
- },
158
- methods: {
159
- /*[loop js.data v idx]*/
160
- /*[if(v.path)]*/
161
- /**
162
- * 获取 ${v.title}
163
- * @param {query} 查询条件
164
- */
165
- get_/*[v.basename]*/(query) {
166
- var _this = this;
167
- if (!query) {
168
- query = {
169
- field: "${v.id},${v.field}${v.father_id ? ',' + v.father_id : '' }${v.title_name ? ',title' : '' }"
170
- };
171
- }
172
- this.$get('~${v.path}', query, function(json) {
173
- if (json.result) {
174
- _this/*['.' + v.name]*/.clear();
175
- _this/*['.' + v.name]*/.addList(json.result.list)
176
- }
177
- });
178
- },
179
- /*[/if]*/
180
- /*[/loop]*/
181
- },
182
- created() {
183
- /*[loop js.data v idx]*/
184
- /*[if(v.path)]*/
185
- // 获取 ${v.title}
186
- this.get_/*[v.basename]*/();
187
- /*[/if]*/
188
- /*[/loop]*/
189
- }
190
- }
191
- </script>
192
-
193
- <style>
194
- </style>
1
+ <template>
2
+ <main id="${id}">
3
+ <div class="mm_warp">
4
+ <div class="mm_container">
5
+ <div class="mm_row">
6
+ <div class="col-mm-12">
7
+ <div class="mm_card">
8
+ <div class="card_head arrow">
9
+ <h5>{{ form[field] ? '修改' : '创建' }}${api.title}</h5>
10
+ </div>
11
+ <div class="card_body">
12
+ <form class="mm_form">
13
+ <dl>
14
+ <!--{loop field v idx}-->
15
+ <!--{if(v.show.form)}-->
16
+ <!--{if(v.name !== sql.key)}-->
17
+ <!--{if(v.required)}-->
18
+ <dt class="required">${v.title}</dt>
19
+ <!--{else}-->
20
+ <dt>${v.title}</dt>
21
+ <!--{/if}-->
22
+ <!--{if(v.dataType === 'tinyint')}-->
23
+ <dd>
24
+ <control_switch v-model="form.${v.name}" />
25
+ </dd>
26
+ <!--{else if(v.format)}-->
27
+ <!--{if(v.format.table)}-->
28
+ <dd>
29
+ <!--{if(v.format.key.endWith('_id') !== -1)}-->
30
+ <control_select type="list" v-model="form.${v.name}"
31
+ :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
32
+ <!--{else}-->
33
+ <control_select v-model="form.${v.name}"
34
+ :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
35
+ <!--{/if}-->
36
+ </dd>
37
+ <!--{else}-->
38
+ <dd>
39
+ <control_select v-model="form.${v.name}"
40
+ :options="$to_kv(${v.label})" />
41
+ </dd>
42
+ <!--{/if}-->
43
+ <!--{else if(v.dataType === 'date')}-->
44
+ <dd>
45
+ <control_input class="time" v-model="form.${v.name}" type="date" />
46
+ </dd>
47
+ <!--{else if(v.dataType === 'time')}-->
48
+ <dd>
49
+ <control_input class="time" v-model="form.${v.name}" type="time" />
50
+ </dd>
51
+ <!--{else if(v.dataType.indexOf('time') !== -1)}-->
52
+ <dd>
53
+ <control_input class="time" v-model="form.${v.name}" type="datetime-local" />
54
+ </dd>
55
+ <!--{else if(v.name.indexOf('img') !== -1 || v.name.indexOf('icon') !== -1 || v.name === 'avatar')}-->
56
+ <dd>
57
+ <control_upload_img width="10rem" height="10rem" name="${v.name}" v-model="form.${v.name}"></control_upload_img>
58
+ <control_input class="mt-2" v-model="form.${v.name}" type="text"></control_input>
59
+ </dd>
60
+ <!--{else if(v.name.indexOf('content') !== -1 || v.dataType.indexOf('longtext') !== -1)}-->
61
+ <dd>
62
+ <control_rich v-model="form.${v.name}"></control_rich>
63
+ </dd>
64
+ <!--{else if(v.dataType.indexOf('text') !== -1)}-->
65
+ <dd>
66
+ <control_textarea v-model="form.${v.name}" type="text"
67
+ placeholder="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}">
68
+ </control_textarea>
69
+ </dd>
70
+ <!--{else if(v.type === 'number' && v.name.indexOf('id') === -1)}-->
71
+ <dd>
72
+ <!--{if(v.number.range && v.number.range.length)}-->
73
+ <control_number v-model="form.${v.name}" :min="${v.number.range[0]}" :max="${v.number.range[1]}" />
74
+ <!--{else}-->
75
+ <control_number v-model="form.${v.name}" :min="${v.number ? v.number.min : -99999999}" :max="${v.number ? v.number.max : 99999999}" />
76
+ <!--{/if}-->
77
+ </dd>
78
+ <!--{else if(v.name === 'value')}-->
79
+ <dd>
80
+ <control_number v-if="form.control == 'number'" tag="number" v-model="form.${v.name}" />
81
+ <control_select v-else-if="form.control == 'select'" tag="select" v-model="form.${v.name}" :mod="form.model" />
82
+ <control_checkbox v-else-if="form.control == 'checkbox' || form.control == 'radio'" :tag="form.control" v-model="form.${v.name}" :mod="form.model" />
83
+ <control_upload_img v-else-if="form.control == 'image'" width="10rem" height="10rem" name="${v.name}" type="text" v-model="form.${v.name}" ></control_upload_img>
84
+ <control_file class="bg_white" v-else-if="form.control == 'file'" accept="*.*" @change="$setFile(form, $event, 'value', false)">
85
+ <span>{{form.${v.name}}}</span><a class="btn" v-if="form.${v.name}.indexOf('/') === 0" :href="$url(form.${v.name})"><span>下载</span></a>
86
+ </control_file>
87
+ <control_com v-else :auto="true" :tag="form.control" v-model="form.${v.name}" />
88
+ </dd>
89
+ <!--{else}-->
90
+ <dd>
91
+ <!--{if(v.required)}-->
92
+ <control_input v-model="form.${v.name}" :minlength="0"
93
+ :maxlength="${v.string ? v.string.max : 0}"
94
+ placeholder="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}"
95
+ :required="true" />
96
+ <!--{else}-->
97
+ <control_input v-model="form.${v.name}" :minlength="0"
98
+ :maxlength="${v.string ? v.string.max : 0}"
99
+ placeholder="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}" />
100
+ <!--{/if}-->
101
+ </dd>
102
+ <!--{/if}-->
103
+ <!--{/if}-->
104
+ <!--{/if}-->
105
+ <!--{/loop}-->
106
+ </dl>
107
+ </form>
108
+ </div>
109
+ <div class="card_foot">
110
+ <div class="mm_group">
111
+ <button class="mm_btn btn_default" type="button" @click="cancel()">返回</button>
112
+ <button class="mm_btn btn_primary" type="button" @click="submit()">提交</button>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </main>
121
+ </template>
122
+
123
+
124
+ <script>
125
+ import control_com from '/src/components/control/control_com.vue';
126
+ import mixin from '/src/mixins/page.js';
127
+
128
+ export default {
129
+ mixins: [mixin],
130
+ components: {
131
+ control_com
132
+ },
133
+ data() {
134
+ return {
135
+ url_add: "${api.path}?method=add",
136
+ url_set: "${api.path}?method=set",
137
+ url_get_obj: "${api.path}?method=get_obj",
138
+ field: "${sql.key}",
139
+ query: {
140
+ "${sql.key}": 0
141
+ },
142
+ form: {
143
+ /*[loop field v idx]*/
144
+ // ${v.title}
145
+ /*[if v.type === 'number']*/
146
+ "${v.name}": ${v.default ? v.default : 0},
147
+ /*[else]*/
148
+ "${v.name}": '${v.default !== "0" ? v.default : ""}',
149
+ /*[/if]*/
150
+ /*[/loop]*/
151
+ },
152
+ /*[loop js.data v idx]*/
153
+ // ${' ' + v.title}
154
+ '${v.name}': ${@JSON.stringify(v.value)},
155
+ /*[/loop]*/
156
+ }
157
+ },
158
+ methods: {
159
+ /*[loop js.data v idx]*/
160
+ /*[if(v.path)]*/
161
+ /**
162
+ * 获取 ${v.title}
163
+ * @param {query} 查询条件
164
+ */
165
+ get_/*[v.basename]*/(query) {
166
+ var _this = this;
167
+ if (!query) {
168
+ query = {
169
+ field: "${v.id},${v.field}${v.father_id ? ',' + v.father_id : '' }${v.title_name ? ',title' : '' }"
170
+ };
171
+ }
172
+ this.$get('~${v.path}', query, function(json) {
173
+ if (json.result) {
174
+ _this/*['.' + v.name]*/.clear();
175
+ _this/*['.' + v.name]*/.addList(json.result.list)
176
+ }
177
+ });
178
+ },
179
+ /*[/if]*/
180
+ /*[/loop]*/
181
+ },
182
+ created() {
183
+ /*[loop js.data v idx]*/
184
+ /*[if(v.path)]*/
185
+ // 获取 ${v.title}
186
+ this.get_/*[v.basename]*/();
187
+ /*[/if]*/
188
+ /*[/loop]*/
189
+ }
190
+ }
191
+ </script>
192
+
193
+ <style>
194
+ </style>
@@ -1,84 +1,70 @@
1
1
  <template>
2
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">
3
+ <div class="mm_warp">
4
+ <div class="mm_container">
5
+ <div class="mm_row">
6
+ <div class="col-12">
7
+ <div class="mm_card">
8
+ <div class="card_head arrow">
9
9
  <h5>${api.title}</h5>
10
10
  </div>
11
11
  <div class="card_body">
12
- <mm_form class="bar_filter">
12
+ <form class="mm_form bar_filter">
13
13
  <div class="title">
14
14
  <h5><span>筛选条件</span></h5>
15
15
  </div>
16
- <mm_list :col="3">
16
+ <div class="mm_list list-3">
17
+ <!--{if(param.list)}-->
17
18
  <!--{loop param.list v idx}-->
18
- <!--{if(v.name === 'keyword')}-->
19
- <mm_item>
19
+ <!--{if(v.name == 'keyword')}-->
20
+ <div class="mm_item">
20
21
  <control_input v-model="query.keyword" title="${v.title}" desc="${v.description.replace(/\([0-9A-Za-z_]+\)/g, '').replace('用于搜索', '').replace(/、/g, ' / ')}"
21
22
  @blur="search()" />
22
- </mm_item>
23
+ </div>
23
24
  <!--{/if}-->
24
25
  <!--{/loop}-->
26
+ <!--{/if}-->
25
27
  <!--{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")}-->
28
+ <!--{if(v.format)}-->
32
29
  <!--{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}-->
30
+ <div class="mm_item">
37
31
  <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
32
  @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>
33
+ </div>
45
34
  <!--{else}-->
46
- <mm_item>
35
+ <div class="mm_item">
47
36
  <control_select v-model="query.${v.format.key}" title="${v.title}" :options="$to_kv(${v.label})" @change="search()" />
48
- </mm_item>
49
- <!--{/if}-->
37
+ </div>
50
38
  <!--{/if}-->
51
39
  <!--{/if}-->
52
40
  <!--{/loop}-->
53
- <mm_item>
54
- <mm_btn class="btn_primary-x" type="reset" @click.native="reset();search()">重置</mm_btn>
55
- </mm_item>
56
- </mm_list>
57
- </mm_form>
41
+ <div class="mm_item">
42
+ <button class="btn_primary-x" type="reset" @click.native="reset();search()">重置</button>
43
+ </div>
44
+ </div>
45
+ </form>
58
46
  <div class="bar_action">
59
47
  <h5><span>操作</span></h5>
60
48
  <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>
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>
63
51
  </div>
64
52
  <div class="btn_small">
65
53
  <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>
54
+ <button class="mm_btn btn_default-x" @click.native="export_db()" v-if="url_export">导出</button>
67
55
  </div>
68
56
  </div>
69
- <mm_table type="2">
57
+ <table class="table-2">
70
58
  <thead class="table-sm">
71
59
  <tr>
72
60
  <th class="th_selected"><input type="checkbox" :checked="select_state" @click="select_all()" /></th>
73
61
  <th class="th_id"><span>#</span></th>
74
62
  <!--{loop field v idx}-->
75
- <!--{if(v.show.table)}-->
76
63
  <!--{if(v.name !== sql.key)}-->
77
- <th class="th_${v.name}">
64
+ <th>
78
65
  <control_reverse title="${v.title}" v-model="query.orderby" field="${v.name}" :func="search"></control_reverse>
79
66
  </th>
80
67
  <!--{/if}-->
81
- <!--{/if}-->
82
68
  <!--{/loop}-->
83
69
  <th class="th_handle"><span>操作</span></th>
84
70
  </tr>
@@ -89,7 +75,6 @@
89
75
  <th class="th_selected"><input type="checkbox" :checked="select_has(o[field])" @click="select_change(o[field])" /></th>
90
76
  <td>{{ o[field] }}</td>
91
77
  <!--{loop field v idx}-->
92
- <!--{if(v.show.table)}-->
93
78
  <!--{if(v.name !== sql.key)}-->
94
79
  <td>
95
80
  <!--{if(v.dataType === 'tinyint')}-->
@@ -117,34 +102,15 @@
117
102
  <!--{/if}-->
118
103
  </td>
119
104
  <!--{/if}-->
120
- <!--{/if}-->
121
105
  <!--{/loop}-->
122
106
  <td>
123
- <mm_btn class="btn_primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
124
- <mm_btn class="btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
107
+ <a class="btn_primary" :href="'./${name}_form?${sql.key}=' + o[field]">修改</a>
108
+ <button class="btn_warning" @click.native="del_show(o, field)">删除</button>
125
109
  </td>
126
110
  </tr>
127
111
  </tbody>
128
112
  <!-- </draggable> -->
129
-
130
- <!--{if param.list.length > 7}-->
131
- <template v-slot:right>
132
- <thead class="table-sm">
133
- <tr>
134
- <th class="th_handle"><span>操作</span></th>
135
- </tr>
136
- </thead>
137
- <tbody>
138
- <tr v-for="(o, idx) in list" :key="idx" :class="{'active': select == idx}" @click="selected(idx)">
139
- <td>
140
- <mm_btn class="btn_primary" :url="'./${name}_form?${sql.key}=' + o[field]">修改</mm_btn>
141
- <mm_btn class="btn_warning" @click.native="del_show(o, field)">删除</mm_btn>
142
- </td>
143
- </tr>
144
- </tbody>
145
- </template>
146
- <!--{/if}-->
147
- </mm_table>
113
+ </table>
148
114
  </div>
149
115
  <div class="card_foot">
150
116
  <div class="fl">
@@ -158,47 +124,41 @@
158
124
  </div>
159
125
  <control_pager display="2" v-model="query.page" :count="count / query.size" :func="goTo" :icons="['首页', '上一页', '下一页', '尾页']"></control_pager>
160
126
  </div>
161
- </mm_card>
162
- </mm_col>
163
- </mm_row>
164
- </mm_container>
165
- </mm_warp>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </div>
166
132
  <mm_modal v-model="show" mask="true">
167
- <mm_card class="card">
133
+ <div class="mm_card">
168
134
  <div class="card_head">
169
135
  <h5>批量修改</h5>
170
136
  </div>
171
137
  <div class="card_body pa">
172
138
  <dl>
173
139
  <!--{loop field v idx}-->
174
- <!--{if(v.show.batch)}-->
140
+ <!--{if(v.format)}-->
175
141
  <dt>${v.title}</dt>
142
+ <!--{if(v.format.table)}-->
143
+ <dd>
144
+ <control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
145
+ </dd>
146
+ <!--{else}-->
176
147
  <dd>
177
- <!--{if(v.show.batch === "input")}-->
178
- <control_input v-model="form.${v.name}" />
179
- <!--{else if(v.show.batch === "select")}-->
180
- <!--{if(v.format.table)}-->
181
- <!--{if(v.format.key.endWith('_id') !== -1)}-->
182
- <control_select type="list" v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
183
- <!--{else}-->
184
- <control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label}, '${v.format.id || v.format.key}', '${v.format.name}')" />
185
- <!--{/if}-->
186
- <!--{else}-->
187
148
  <control_select v-model="form.${v.format.key}" :options="$to_kv(${v.label})" />
188
- <!--{/if}-->
189
- <!--{/if}-->
190
149
  </dd>
191
150
  <!--{/if}-->
151
+ <!--{/if}-->
192
152
  <!--{/loop}-->
193
153
  </dl>
194
154
  </div>
195
155
  <div class="card_foot">
196
156
  <div class="mm_group">
197
- <button class="btn_default" type="reset" @click="show = false">取消</button>
198
- <button class="btn_primary" type="button" @click="batchSet()">提交</button>
157
+ <button class="mm_btn btn_default" type="reset" @click="show = false">取消</button>
158
+ <button class="mm_btn btn_primary" type="button" @click="batchSet()">提交</button>
199
159
  </div>
200
160
  </div>
201
- </mm_card>
161
+ </div>
202
162
  </mm_modal>
203
163
  </main>
204
164
  </template>