b30375b8 by lxs

分级分类任务更新

1 parent f39ba7a0
...@@ -48,8 +48,8 @@ const maxHeight = computed(() => { ...@@ -48,8 +48,8 @@ const maxHeight = computed(() => {
48 return props.tableInfo.maxHeight 48 return props.tableInfo.maxHeight
49 ? props.tableInfo.maxHeight 49 ? props.tableInfo.maxHeight
50 : showPage.value 50 : showPage.value
51 ? "calc(100% - 44px)" 51 ? "calc(100% - 44px)"
52 : "100%"; 52 : "100%";
53 }); 53 });
54 const multiple = computed(() => { 54 const multiple = computed(() => {
55 return props.tableInfo.multiple ?? false; 55 return props.tableInfo.multiple ?? false;
...@@ -123,7 +123,7 @@ const handleClick = (scope, btn) => { ...@@ -123,7 +123,7 @@ const handleClick = (scope, btn) => {
123 if (scope.row.disabled || btn.disabled) return; 123 if (scope.row.disabled || btn.disabled) return;
124 emits("tableBtnClick", scope, btn); 124 emits("tableBtnClick", scope, btn);
125 }; 125 };
126 const popoverHover = (scope, btn)=>{ 126 const popoverHover = (scope, btn) => {
127 emits("tableBtnClick", scope, btn); 127 emits("tableBtnClick", scope, btn);
128 } 128 }
129 const selectionChange = (val) => { 129 const selectionChange = (val) => {
...@@ -158,7 +158,7 @@ const inputKeyUp = (regexp, scope, item) => { ...@@ -158,7 +158,7 @@ const inputKeyUp = (regexp, scope, item) => {
158 return; 158 return;
159 } 159 }
160 if (regexp) { 160 if (regexp) {
161 scope.row[field] = scope.row[field].replace(regexp,'') 161 scope.row[field] = scope.row[field].replace(regexp, '')
162 } 162 }
163 // 特殊处理,apiCreate.vue中defaultParamsTableInfo的pageSize限制输入最大值100. 163 // 特殊处理,apiCreate.vue中defaultParamsTableInfo的pageSize限制输入最大值100.
164 if (scope.row.paramName == 'pageSize' && scope.row[field] > 100) { 164 if (scope.row.paramName == 'pageSize' && scope.row[field] > 100) {
...@@ -175,7 +175,7 @@ const rowClassName = (rowObj) => { ...@@ -175,7 +175,7 @@ const rowClassName = (rowObj) => {
175 } 175 }
176 const row = rowObj.row; 176 const row = rowObj.row;
177 let className = ""; 177 let className = "";
178 if (row.ROWID && row.STATUS === "edit" && row.STATE === "Running" ) { 178 if (row.ROWID && row.STATUS === "edit" && row.STATE === "Running") {
179 className = "edit_row"; 179 className = "edit_row";
180 } 180 }
181 return className; 181 return className;
...@@ -202,8 +202,8 @@ const pageChange = (page) => { ...@@ -202,8 +202,8 @@ const pageChange = (page) => {
202 let info = { ...page, id: props.tableInfo.id }; 202 let info = { ...page, id: props.tableInfo.id };
203 emits("tablePageChange", info); 203 emits("tablePageChange", info);
204 }; 204 };
205 const tableRowClassName1 = ({row,rowIndex})=>{ 205 const tableRowClassName1 = ({ row, rowIndex }) => {
206 return row.isAlter=="Y"? "primary":"" 206 return row.isAlter == "Y" ? "primary" : ""
207 } 207 }
208 208
209 onMounted(() => { 209 onMounted(() => {
...@@ -220,71 +220,33 @@ onMounted(() => { ...@@ -220,71 +220,33 @@ onMounted(() => {
220 </script> 220 </script>
221 221
222 <template> 222 <template>
223 <div 223 <div class="table_panel" :id="props.tableInfo.id" :style="{
224 class="table_panel" 224 height: props.tableInfo.height ?? '100%',
225 :id="props.tableInfo.id" 225 'min-height': props.tableInfo.minPanelHeight ?? ''
226 :style="{ 226 }">
227 height: props.tableInfo.height ?? '100%', 227 <el-table ref="tableRef" :class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }"
228 'min-height': props.tableInfo.minPanelHeight ?? '' 228 :data="tableData" :highlight-current-row="props.tableInfo.heightlightRow ?? true"
229 }" 229 :show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border
230 > 230 ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')"
231 <el-table 231 :max-height="maxHeight" :row-key="rowKey" :current-row-key="currentRowKey" :row-class-name="rowClassName"
232 ref="tableRef" 232 v-loading="tableDataLoading" @row-click="rowClick" @row-dblclick="rowDblClick" @selection-change="selectionChange"
233 :class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }" 233 @select="tableCheckboxSelectChange" @select-all="tableCheckboxAllSelectChange"
234 :data="tableData" 234 style="width: 100%; display: inline-block" :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }"
235 :highlight-current-row=" props.tableInfo.heightlightRow ?? true" 235 tooltip-effect="light" :tooltip-options="{ placement: 'top', popperClass: 'table_cell_tooltip' }"
236 :show-header="props.tableInfo.showHeader ?? true" 236 :show-summary="props.tableInfo.showSummary ?? false">
237 stripe 237 <el-table-column type="selection" :width="32" align="center" v-if="multiple" :selectable="rowSelectable"
238 :border="props.tableInfo.border 238 :fixed="fixedSelection" />
239 ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')" 239 <el-table-column v-for="item in tableFields" :label="item.label" :width="item.width" :min-width="item.minWidth"
240 :max-height="maxHeight" 240 :fixed="item.fixed" :align="item.align" :type="item.type == 'index' ? '' : undefined"
241 :row-key="rowKey" 241 :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass"
242 :current-row-key="currentRowKey" 242 :show-overflow-tooltip="item.type != 'switch'">
243 :row-class-name="rowClassName" 243 <template #header>
244 v-loading="tableDataLoading"
245 @row-click="rowClick"
246 @row-dblclick="rowDblClick"
247 @selection-change="selectionChange"
248 @select="tableCheckboxSelectChange"
249 @select-all="tableCheckboxAllSelectChange"
250 style="width: 100%; display: inline-block"
251 :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }"
252 tooltip-effect="light"
253 :tooltip-options="{ placement: 'top', popperClass: 'table_cell_tooltip' }"
254 :show-summary="props.tableInfo.showSummary ?? false"
255 >
256 <el-table-column
257 type="selection"
258 :width="32"
259 align="center"
260 v-if="multiple"
261 :selectable="rowSelectable"
262 :fixed="fixedSelection"
263 />
264 <el-table-column
265 v-for="item in tableFields"
266 :label="item.label"
267 :width="item.width"
268 :min-width="item.minWidth"
269 :fixed="item.fixed"
270 :align="item.align"
271 :type="item.type == 'index' ? '' : undefined"
272 :sortable="item.sortable ?? false"
273 :prop="item.field"
274 :class-name="item.columClass"
275 :show-overflow-tooltip="item.type != 'switch'"
276 >
277 <template #header>
278 <template v-if="!!item?.toolTipContent"> 244 <template v-if="!!item?.toolTipContent">
279 <span style="color:#000;display: inline-block">{{ item.label }}</span> 245 <span style="color:#000;display: inline-block">{{ item.label }}</span>
280 <el-tooltip 246 <el-tooltip effect="light" :content="item.toolTipContent" placement="top">
281 effect="light" 247 <el-icon style="color:#b2b2b2;">
282 :content="item.toolTipContent" 248 <QuestionFilled />
283 placement="top" 249 </el-icon>
284 >
285 <el-icon style="color:#b2b2b2;">
286 <QuestionFilled />
287 </el-icon>
288 250
289 </el-tooltip> 251 </el-tooltip>
290 252
...@@ -293,7 +255,7 @@ onMounted(() => { ...@@ -293,7 +255,7 @@ onMounted(() => {
293 <span style="color:#000">{{ item.label }}</span> 255 <span style="color:#000">{{ item.label }}</span>
294 <span v-if="item.required === true" style="color:red;margin-left: 2px;">*</span> 256 <span v-if="item.required === true" style="color:red;margin-left: 2px;">*</span>
295 </template> 257 </template>
296 </template> 258 </template>
297 <template #default="scope" v-if="item.type == 'index'"> 259 <template #default="scope" v-if="item.type == 'index'">
298 <span v-if="showPage">{{ 260 <span v-if="showPage">{{
299 pageInfo.curr !== undefined 261 pageInfo.curr !== undefined
...@@ -303,97 +265,78 @@ onMounted(() => { ...@@ -303,97 +265,78 @@ onMounted(() => {
303 <span v-else>{{ props.tableInfo.sortable ? (scope.row.index) : (scope.$index + 1) }}</span> 265 <span v-else>{{ props.tableInfo.sortable ? (scope.row.index) : (scope.$index + 1) }}</span>
304 </template> 266 </template>
305 <template #default="scope" v-else-if="item.type == 'tag'"> 267 <template #default="scope" v-else-if="item.type == 'tag'">
306 <el-tag v-if="scope.row[item.field] !== undefined" :type="item.tagType?item.tagType(scope):tagType(scope.row, item.field)">{{ 268 <el-tag v-if="scope.row[item.field] !== undefined"
307 item.getName?item.getName(scope):tagMethod(scope.row, item.field) 269 :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
308 }}</el-tag> 270 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
309 <span v-else>{{ '--' }}</span> 271 }}</el-tag>
272 <span v-else>{{ '--' }}</span>
310 </template> 273 </template>
311 <template #default="scope" v-else-if="item.type == 'popover'"> 274 <template #default="scope" v-else-if="item.type == 'popover'">
312 <el-popover 275 <el-popover v-if="scope.row[item.field] !== undefined && (item.checkName ? item.checkName(scope) : true)"
313 v-if="scope.row[item.field] !== undefined && (item.checkName?item.checkName(scope):true)" 276 placement="left-start" :title="props.tableInfo.popoverTitle || '变化'" :width="476" trigger="hover"
314 placement="left-start" 277 @show="() => popoverHover(scope, item)">
315 :title="props.tableInfo.popoverTitle || '变化'" 278 <template #reference>
316 :width="476" 279 <span :class="{ text_btn: item.checkName ? item.checkName(scope) : true }">{{
317 trigger="hover" 280 item.getName ? item.getName(scope):"详情" }}</span>
318 @show="()=>popoverHover(scope,item)" 281 </template>
319 > 282 <el-table :data="props.tableInfo.popoverData" v-loading="props.tableInfo.popoverloading" class="tablePover"
320 <template #reference> 283 :row-class-name="tableRowClassName1" border tooltip-effect="light"
321 <span :class="{text_btn:item.checkName?item.checkName(scope):true}">{{ item.getName?item.getName(scope):"详情" }}</span> 284 :span-method="props.tableInfo?.arraySpanMethod">
322 </template> 285 <el-table-column v-for="col in item.column" :width="col.width" :property="col.field" :label="col.label"
323 <el-table :data="props.tableInfo.popoverData" v-loading="props.tableInfo.popoverloading" 286 :key="col.field" show-overflow-tooltip>
324 class="tablePover" :row-class-name="tableRowClassName1" border tooltip-effect="light" :span-method="props.tableInfo?.arraySpanMethod"> 287 <template #default="scope">
325 <el-table-column v-for="col in item.column" :width="col.width" :property="col.field" :label="col.label" :key="col.field" show-overflow-tooltip >
326 <template #default="scope">
327 {{ scope.row[col.field] || '--' }} 288 {{ scope.row[col.field] || '--' }}
328 </template> 289 </template>
329 </el-table-column> 290 </el-table-column>
330 </el-table> 291 </el-table>
331 </el-popover> 292 </el-popover>
332 <span v-else>{{item.getName?(item.getName(scope) || '--'):"--"}}</span> 293 <span v-else>{{ item.getName ? (item.getName(scope) || '--') : "--" }}</span>
333 </template> 294 </template>
334 <template #default="scope" v-else-if="item.type == 'filter'"> 295 <template #default="scope" v-else-if="item.type == 'filter'">
335 <span>{{ tagMethod(scope.row, item.field) }}</span> 296 <span>{{ tagMethod(scope.row, item.field) }}</span>
336 </template> 297 </template>
337 <template #default="scope" v-else-if="item.type == 'chnum'"> 298 <template #default="scope" v-else-if="item.type == 'chnum'">
338 <span v-if="!!item.isNaN">{{ scope.row[item.field]?changeNum(scope.row[item.field]):"--" }}</span> 299 <span v-if="!!item.isNaN">{{ scope.row[item.field] ? changeNum(scope.row[item.field]) : "--" }}</span>
339 <span v-else>{{ 300 <span v-else>{{
340 scope.row[item.field] != null ? 301 scope.row[item.field] != null ?
341 changeNum( 302 changeNum(
342 scope.row[item.field] ? scope.row[item.field] : 0, 303 scope.row[item.field] ? scope.row[item.field] : 0,
343 item.fixedNum ?? 0 304 item.fixedNum ?? 0
344 ) : '--' 305 ) : '--'
345 }}</span> 306 }}</span>
346 <span v-if="item.unit">{{ item.unit }}</span> 307 <span v-if="item.unit">{{ item.unit }}</span>
347 </template> 308 </template>
348 <template #default="scope" v-else-if="item.type == 'switch'"> 309 <template #default="scope" v-else-if="item.type == 'switch'">
349 <el-switch 310 <el-switch v-model="scope.row[item.field]" inline-prompt
350 v-model="scope.row[item.field]" 311 :disabled="!item.isDisabled ? false : item.isDisabled(scope)" :active-value="item.activeValue"
351 inline-prompt 312 :inactive-value="item.inactiveValue" :width="item.switchWidth" :active-text="item.activeText"
352 :disabled="!item.isDisabled ? false : item.isDisabled(scope)" 313 :inactive-text="item.inactiveText" :before-change="() => beforeChange(scope, item)"
353 :active-value="item.activeValue" 314 @change="(val) => switchChange(val, scope, item.field)" />
354 :inactive-value="item.inactiveValue"
355 :width="item.switchWidth"
356 :active-text="item.activeText"
357 :inactive-text="item.inactiveText"
358 :before-change="() => beforeChange(scope, item)"
359 @change="(val) => switchChange(val, scope, item.field)"
360 />
361 </template> 315 </template>
362 <template #default="scope" v-else-if="item.type == 'menu'"> 316 <template #default="scope" v-else-if="item.type == 'menu'">
363 {{ item.menus[scope.row[item.field]] }} 317 {{ item.menus[scope.row[item.field]] }}
364 <!-- {{ scope.row[item.field] }} --> 318 <!-- {{ scope.row[item.field] }} -->
365 </template> 319 </template>
366 <template #default="scope" v-else-if="item.type == 'text_btn'"> 320 <template #default="scope" v-else-if="item.type == 'text_btn'">
367 <span v-if="scope.row[item.field] != null" :class="item.class + ' text_btn'" 321 <span v-if="scope.row[item.field] != null" :class="item.class + ' text_btn'"
368 @click="(item.click && !item.disabled && !scope.row.disabled) ? item.click(scope, { label: item.label, value: item.value }): handleClick(scope, { label: item.label, value: item.value })" v-preReClick>{{ item.getName ? item.getName(scope) : scope.row[item.field] 322 @click="(item.click && !item.disabled && !scope.row.disabled) ? item.click(scope, { label: item.label, value: item.value }) : handleClick(scope, { label: item.label, value: item.value })"
323 v-preReClick>{{ item.getName ? item.getName(scope) : scope.row[item.field]
369 }}</span> 324 }}</span>
370 <span v-else>--</span> 325 <span v-else>--</span>
371 </template> 326 </template>
372 <template #default="scope" v-else-if="item.type == 'btn'"> 327 <template #default="scope" v-else-if="item.type == 'btn'">
373 <template v-for="btn in item.btns"> 328 <template v-for="btn in item.btns">
374 <span 329 <span v-if="btn.visible ?? true" class="text_btn"
375 v-if="btn.visible ?? true" 330 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
376 class="text_btn" 331 v-preReClick>{{ btn.label }}</span>
377 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
378 v-preReClick
379 >{{ btn.label }}</span
380 >
381 </template> 332 </template>
382 </template> 333 </template>
383 <template #default="scope" v-else-if="item.type == 'input'"> 334 <template #default="scope" v-else-if="item.type == 'input'">
384 <el-input 335 <el-input v-model.trim="scope.row[item.field]" placeholder="请输入" :maxlength="item.maxlength ?? ''"></el-input>
385 v-model.trim="scope.row[item.field]"
386 placeholder="请输入"
387 :maxlength="item.maxlength ?? ''"
388 ></el-input>
389 </template> 336 </template>
390 <template #default="scope" v-else-if="item.type == 'tooltip'"> 337 <template #default="scope" v-else-if="item.type == 'tooltip'">
391 <el-tooltip 338 <el-tooltip :placement="item.placement ?? 'bottom-start'" effect="light" popper-class="table_tooltip"
392 :placement="item.placement ?? 'bottom-start'" 339 :trigger="item.trigger">
393 effect="light"
394 popper-class="table_tooltip"
395 :trigger="item.trigger"
396 >
397 <template #content> 340 <template #content>
398 <div style="width: 236px; text-align: justify"> 341 <div style="width: 236px; text-align: justify">
399 <p class="tips_title">不符合规则</p> 342 <p class="tips_title">不符合规则</p>
...@@ -405,159 +348,85 @@ onMounted(() => { ...@@ -405,159 +348,85 @@ onMounted(() => {
405 </el-tooltip> 348 </el-tooltip>
406 </template> 349 </template>
407 <template #default="scope" v-else-if="item.type && item.type == 'edit'"> 350 <template #default="scope" v-else-if="item.type && item.type == 'edit'">
408 <template v-if="(props.tableInfo.STATUS == 'edit' || scope.row.STATUS == 'edit') && (item.getVisible ? item.getVisible(scope) : true)"> 351 <template
409 <el-select 352 v-if="(props.tableInfo.STATUS == 'edit' || scope.row.STATUS == 'edit') && (item.getVisible ? item.getVisible(scope) : true)">
410 v-if=" 353 <el-select v-if="
411 editForm[item.field] && editForm[item.field].type == 'select' 354 editForm[item.field] && editForm[item.field].type == 'select'
412 " 355 " v-model="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
413 v-model="scope.row[item.field]" 356 :clearable="editForm[item.field].clearable" :filterable="editForm[item.field].filterable ?? true"
414 :placeholder="editForm[item.field].placeholder" 357 :disabled="editForm[item.field].disabled && scope.row.guid !== undefined
415 :clearable="editForm[item.field].clearable" 358 " @change="(val) => selectChange(val, scope, item)">
416 :filterable="editForm[item.field].filterable ?? true"
417 :disabled="
418 editForm[item.field].disabled && scope.row.guid !== undefined
419 "
420 @change="(val) => selectChange(val, scope, item)"
421 >
422 <el-option v-if="props.tableInfo.readonly" label="--" value="" /> 359 <el-option v-if="props.tableInfo.readonly" label="--" value="" />
423 <el-option 360 <el-option
424 v-for="opt in editForm[item.field].getOptions ? editForm[item.field].getOptions(scope) : editForm[item.field].options" 361 v-for="opt in editForm[item.field].getOptions ? editForm[item.field].getOptions(scope) : editForm[item.field].options"
425 :label="editForm[item.field]?.props?.label ? opt[editForm[item.field].props.label] : opt.label" 362 :label="editForm[item.field]?.props?.label ? opt[editForm[item.field].props.label] : opt.label"
426 :value="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value" 363 :value="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value"
427 :key="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value" 364 :key="editForm[item.field]?.props?.value ? opt[editForm[item.field].props.value] : opt.value" />
428 />
429 </el-select> 365 </el-select>
430 <el-input 366 <el-input v-else-if="
431 v-else-if=" 367 editForm[item.field] && editForm[item.field].type == 'input'
432 editForm[item.field] && editForm[item.field].type == 'input' 368 " v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
433 " 369 :clearable="editForm[item.field].clearable" :maxlength="editForm[item.field].maxlength ?? ''" :disabled="editForm[item.field].disabled && scope.row.guid !== undefined
434 v-model.trim="scope.row[item.field]" 370 " @input="inputKeyUp(editForm[item.field].regexp, scope, editForm[item.field])"
435 :placeholder="editForm[item.field].placeholder"
436 :clearable="editForm[item.field].clearable"
437 :maxlength="editForm[item.field].maxlength ?? ''"
438 :disabled="
439 editForm[item.field].disabled && scope.row.guid !== undefined
440 "
441 @input="inputKeyUp(editForm[item.field].regexp, scope, editForm[item.field])"
442 @change="(val) => inputChange(val, scope, item)" 371 @change="(val) => inputChange(val, scope, item)"
443 @focus="(event) => inputFocus(event, scope, editForm[item.field])" 372 @focus="(event) => inputFocus(event, scope, editForm[item.field])"></el-input>
444 ></el-input>
445 <template v-else-if="editForm[item.field] && editForm[item.field].type == 'defaultValue'"> 373 <template v-else-if="editForm[item.field] && editForm[item.field].type == 'defaultValue'">
446 <el-date-picker v-if="scope.row[item.dataTypeName] === 'date'" v-model="scope.row[item.field]" type="date" 374 <el-date-picker v-if="scope.row[item.dataTypeName] === 'date'" v-model="scope.row[item.field]" type="date"
447 format="YYYY-MM-DD" value-format="YYYY-MM-DD" :placeholder="editForm[item.field].placeholder" /> 375 format="YYYY-MM-DD" value-format="YYYY-MM-DD" :placeholder="editForm[item.field].placeholder" />
448 <el-date-picker v-else-if="scope.row[item.dataTypeName] === 'datetime'" 376 <el-date-picker v-else-if="scope.row[item.dataTypeName] === 'datetime'" v-model="scope.row[item.field]"
449 v-model="scope.row[item.field]" :placeholder="editForm[item.field].placeholder" type="datetime" format="YYYY-MM-DD HH:mm:ss" 377 :placeholder="editForm[item.field].placeholder" type="datetime" format="YYYY-MM-DD HH:mm:ss"
450 value-format="YYYY-MM-DD HH:mm:ss" /> 378 value-format="YYYY-MM-DD HH:mm:ss" />
451 <el-input v-else v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder" :clearable="editForm[item.field].clearable" 379 <el-input v-else v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
452 :maxlength="editForm[item.field].maxlength ?? ''" 380 :clearable="editForm[item.field].clearable" :maxlength="editForm[item.field].maxlength ?? ''"
453 @input="inputKeyUp(scope.row[item.dataTypeName] == 'int' ? /\D/g : (scope.row[item.dataTypeName] == 'decimal' ? /[^0-9.-]/g : ''), scope, editForm[item.field])" 381 @input="inputKeyUp(scope.row[item.dataTypeName] == 'int' ? /\D/g : (scope.row[item.dataTypeName] == 'decimal' ? /[^0-9.-]/g : ''), scope, editForm[item.field])"
454 @change="(val) => inputChange(val, scope, item)" /> 382 @change="(val) => inputChange(val, scope, item)" />
455 </template> 383 </template>
456 <template 384 <template v-else-if="
457 v-else-if=" 385 editForm[item.field] && editForm[item.field].type == 'btn'
458 editForm[item.field] && editForm[item.field].type == 'btn' 386 ">
459 "
460 >
461 <template v-for="btn in scope.row[item.field].btns"> 387 <template v-for="btn in scope.row[item.field].btns">
462 <span 388 <span v-if="btn.visible ?? true" class="text_btn"
463 v-if="btn.visible ?? true" 389 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
464 class="text_btn" 390 v-preReClick>{{ btn.label }}</span>
465 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
466 v-preReClick
467 >{{ btn.label }}</span
468 >
469 </template> 391 </template>
470 </template> 392 </template>
471 <template 393 <template v-else-if="
472 v-else-if=" 394 editForm[item.field] && editForm[item.field].type == 'comb'
473 editForm[item.field] && editForm[item.field].type == 'comb' 395 ">
474 "
475 >
476 <div v-if="scope.row['ruleType'] == 'Serial'" class="input_comb"> 396 <div v-if="scope.row['ruleType'] == 'Serial'" class="input_comb">
477 <span> 397 <span>
478 <span>起始值</span> 398 <span>起始值</span>
479 <el-input 399 <el-input v-model.trim="scope.row.start" style="width: 40px"></el-input>
480 v-model.trim="scope.row.start"
481 style="width: 40px"
482 ></el-input>
483 </span> 400 </span>
484 <span> 401 <span>
485 <span>最大值</span> 402 <span>最大值</span>
486 <el-input 403 <el-input v-model.trim="scope.row.max" style="width: 100px"></el-input>
487 v-model.trim="scope.row.max"
488 style="width: 100px"
489 ></el-input>
490 </span> 404 </span>
491 <span> 405 <span>
492 <span>长度</span> 406 <span>长度</span>
493 <el-input 407 <el-input v-model.trim="scope.row.len" style="width: 40px"></el-input>
494 v-model.trim="scope.row.len"
495 style="width: 40px"
496 ></el-input>
497 </span> 408 </span>
498 <span> 409 <span>
499 <span>步长</span> 410 <span>步长</span>
500 <el-input 411 <el-input v-model.trim="scope.row.step" style="width: 40px"></el-input>
501 v-model.trim="scope.row.step"
502 style="width: 40px"
503 ></el-input>
504 </span> 412 </span>
505 </div> 413 </div>
506 <el-input 414 <el-input v-else-if="scope.row['ruleType'] == 'Fixed'" v-model.trim="scope.row.fixedValue"
507 v-else-if="scope.row['ruleType'] == 'Fixed'" 415 clearable></el-input>
508 v-model.trim="scope.row.fixedValue" 416 <el-select v-else-if="scope.row['ruleType'] == 'Separator'" v-model="scope.row.separator" clearable>
509 clearable 417 <el-option v-if="props.tableInfo.readonly" label="--" value="" />
510 ></el-input> 418 <el-option v-for="opt in editForm[item.field].codeRule.Separator.options" :key="opt.value"
511 <el-select 419 :label="opt.label" :value="opt.value" />
512 v-else-if="scope.row['ruleType'] == 'Separator'"
513 v-model="scope.row.separator"
514 clearable
515 >
516 <el-option
517 v-if="props.tableInfo.readonly"
518 label="--"
519 value=""
520 />
521 <el-option
522 v-for="opt in editForm[item.field].codeRule.Separator.options"
523 :key="opt.value"
524 :label="opt.label"
525 :value="opt.value"
526 />
527 </el-select> 420 </el-select>
528 <el-select 421 <el-select v-else-if="scope.row['ruleType'] == 'Date'" v-model="scope.row.format" clearable>
529 v-else-if="scope.row['ruleType'] == 'Date'" 422 <el-option v-if="props.tableInfo.readonly" label="--" value="" />
530 v-model="scope.row.format" 423 <el-option v-for="opt in editForm[item.field].codeRule.Date.options" :key="opt.value" :label="opt.label"
531 clearable 424 :value="opt.value" />
532 >
533 <el-option
534 v-if="props.tableInfo.readonly"
535 label="--"
536 value=""
537 />
538 <el-option
539 v-for="opt in editForm[item.field].codeRule.Date.options"
540 :key="opt.value"
541 :label="opt.label"
542 :value="opt.value"
543 />
544 </el-select> 425 </el-select>
545 <el-select 426 <el-select v-else-if="scope.row['ruleType'] == 'Guid'" v-model="scope.row.mode" clearable>
546 v-else-if="scope.row['ruleType'] == 'Guid'" 427 <el-option v-if="props.tableInfo.readonly" label="--" value="" />
547 v-model="scope.row.mode" 428 <el-option v-for="opt in editForm[item.field].codeRule.Guid.options" :key="opt.value" :label="opt.label"
548 clearable 429 :value="opt.value" />
549 >
550 <el-option
551 v-if="props.tableInfo.readonly"
552 label="--"
553 value=""
554 />
555 <el-option
556 v-for="opt in editForm[item.field].codeRule.Guid.options"
557 :key="opt.value"
558 :label="opt.label"
559 :value="opt.value"
560 />
561 </el-select> 430 </el-select>
562 <span v-else>{{ scope.row[item.field] ?? "--" }}</span> 431 <span v-else>{{ scope.row[item.field] ?? "--" }}</span>
563 </template> 432 </template>
...@@ -568,41 +437,32 @@ onMounted(() => { ...@@ -568,41 +437,32 @@ onMounted(() => {
568 <template #default="scope" v-else> 437 <template #default="scope" v-else>
569 <template v-if="item.getSvg"> 438 <template v-if="item.getSvg">
570 <el-icon class="svg-title-icon" :class="item.getSvg(scope)"> 439 <el-icon class="svg-title-icon" :class="item.getSvg(scope)">
571 <svg-icon :name="item.getSvg(scope)" /> 440 <svg-icon :name="item.getSvg(scope)" />
572 </el-icon> 441 </el-icon>
573 <span :style="{'margin-left': '5px'}">{{ 442 <span :style="{ 'margin-left': '5px' }">{{
574 item.getName 443 item.getName
575 ? item.getName(scope) 444 ? item.getName(scope)
576 : scope.row[item.field] !== 0 && !scope.row[item.field] 445 : scope.row[item.field] !== 0 && !scope.row[item.field]
577 ? "--" 446 ? "--"
578 : scope.row[item.field] 447 : scope.row[item.field]
579 }}</span> 448 }}</span>
580 </template> 449 </template>
581 <!--- 直接用??会导致空字符串时无法显示'--',此处需要区分0和“” --> 450 <!--- 直接用??会导致空字符串时无法显示'--',此处需要区分0和“” -->
582 <span v-else>{{ 451 <span v-else>{{
583 item.getName 452 item.getName
584 ? item.getName(scope) 453 ? item.getName(scope)
585 : scope.row[item.field] !== 0 && !scope.row[item.field] 454 : scope.row[item.field] !== 0 && !scope.row[item.field]
586 ? "--" 455 ? "--"
587 : scope.row[item.field] 456 : scope.row[item.field]
588 }}</span> 457 }}</span>
589 </template> 458 </template>
590 </el-table-column> 459 </el-table-column>
591 <el-table-column 460 <el-table-column :width="actionInfo.width" :class-name="actionInfo.columClass" fixed="right"
592 :width="actionInfo.width" 461 v-if="actionInfo.show ?? true">
593 :class-name="actionInfo.columClass"
594 fixed="right"
595 v-if="actionInfo.show ?? true"
596 >
597 <template #header> 462 <template #header>
598 <div class="header_title"> 463 <div class="header_title">
599 <span>{{ actionInfo.label ?? "操作" }}</span> 464 <span>{{ actionInfo.label ?? "操作" }}</span>
600 <el-tooltip 465 <el-tooltip placement="top" effect="light" popper-class="table_tooltip" v-if="actionInfo.tooltip">
601 placement="top"
602 effect="light"
603 popper-class="table_tooltip"
604 v-if="actionInfo.tooltip"
605 >
606 <template #content> 466 <template #content>
607 <div style="width: 236px; text-align: justify"> 467 <div style="width: 236px; text-align: justify">
608 帮助:初始化为系统底层操作,为会员创建数据库及系统表操作,一旦初始化将不可以删除会员。 468 帮助:初始化为系统底层操作,为会员创建数据库及系统表操作,一旦初始化将不可以删除会员。
...@@ -618,169 +478,95 @@ onMounted(() => { ...@@ -618,169 +478,95 @@ onMounted(() => {
618 <!-- 某些操作按钮需要根据当前行信息设置显示隐藏,actionInfo.btns使用回调函数返回。 --> 478 <!-- 某些操作按钮需要根据当前行信息设置显示隐藏,actionInfo.btns使用回调函数返回。 -->
619 <template v-if="actionInfo.isMore"> 479 <template v-if="actionInfo.isMore">
620 <template v-if="Array.isArray(actionInfo.btns) 480 <template v-if="Array.isArray(actionInfo.btns)
621 ? actionInfo.btns.length>4 481 ? actionInfo.btns.length > 4
622 : actionInfo.btns(scope).length>4"> 482 : actionInfo.btns(scope).length > 4">
623 <template 483 <template v-for="(btn, b) in Array.isArray(actionInfo.btns)
624 v-for="(btn, b) in Array.isArray(actionInfo.btns) 484 ? actionInfo.btns.slice(0, 4)
625 ? actionInfo.btns.slice(0,4) 485 : actionInfo.btns(scope).slice(0, 4)">
626 : actionInfo.btns(scope).slice(0,4)" 486 <span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
627 > 487 <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
628 <span 488 @showPopver="handleClick" @popverBtnClick="handleClick" />
629 class="operate_btn" 489 <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else
630 :class="{ active: btn.visible ?? true }" 490 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
631 v-if="btn.visible ?? true" 491 v-preReClick>{{ btn.label }}</span>
632 > 492 </span>
633 <BtnPopover 493 </template>
634 v-if="btn.value == 'authority'" 494 <span class="operate_btn active">
635 :popover-info="{ scope, btn, ...popverData }" 495 <el-dropdown trigger="hover" :show-timeout="50">
636 @showPopver="handleClick" 496 <span class="text_btn">...</span>
637 @popverBtnClick="handleClick" 497 <template #dropdown>
638 /> 498 <el-dropdown-menu>
639 <span 499 <el-dropdown-item v-for="(btn, b) in Array.isArray(actionInfo.btns)
640 class="text_btn" 500 ? actionInfo.btns.slice(4)
641 :class="{ 'is-disabled': !!btn.disabled }" 501 : actionInfo.btns(scope).slice(4)">
642 v-else 502 <span class="operate_btn" style="width: 100%; display: inline-block;"
643 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)" 503 :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
644 v-preReClick 504 <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
645 >{{ btn.label }}</span> 505 @showPopver="handleClick" @popverBtnClick="handleClick" />
646 </span> 506 <span class="text_btn" style="width: 100%;display: block;"
647 </template> 507 :class="{ 'is-disabled': !!btn.disabled }" v-else
648 <span class="operate_btn active"> 508 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
649 <el-dropdown trigger="hover" :show-timeout="50" > 509 v-preReClick>{{ btn.label }}</span>
650 <span class="text_btn">...</span> 510 </span>
651 <template #dropdown> 511 </el-dropdown-item>
652 512 </el-dropdown-menu>
653 <el-dropdown-menu > 513 </template>
654 <el-dropdown-item v-for="(btn, b) in Array.isArray(actionInfo.btns) 514 </el-dropdown>
655 ? actionInfo.btns.slice(4)
656 : actionInfo.btns(scope).slice(4)">
657 <span
658 class="operate_btn"
659 style="width: 100%; display: inline-block;"
660 :class="{ active: btn.visible ?? true }"
661 v-if="btn.visible ?? true"
662 >
663 <BtnPopover
664 v-if="btn.value == 'authority'"
665 :popover-info="{ scope, btn, ...popverData }"
666 @showPopver="handleClick"
667 @popverBtnClick="handleClick"
668 />
669 <span
670 class="text_btn"
671 style="width: 100%;display: block;"
672 :class="{ 'is-disabled': !!btn.disabled }"
673 v-else
674 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
675 v-preReClick
676 >{{ btn.label }}</span
677 >
678 </span> 515 </span>
679 </el-dropdown-item>
680 </el-dropdown-menu>
681 </template> 516 </template>
682 </el-dropdown> 517 <template v-else>
683 </span> 518 <template v-for="(btn, b) in Array.isArray(actionInfo.btns)
684 </template> 519 ? actionInfo.btns
685 <template v-else> 520 : actionInfo.btns(scope)">
686 <template 521 <span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
687 v-for="(btn, b) in Array.isArray(actionInfo.btns) 522 <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
688 ? actionInfo.btns 523 @showPopver="handleClick" @popverBtnClick="handleClick" />
689 : actionInfo.btns(scope)" 524 <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else
690 > 525 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
691 <span 526 v-preReClick>{{ btn.label }}</span>
692 class="operate_btn" 527 </span>
693 :class="{ active: btn.visible ?? true }" 528 </template>
694 v-if="btn.visible ?? true" 529 </template>
695 >
696 <BtnPopover
697 v-if="btn.value == 'authority'"
698 :popover-info="{ scope, btn, ...popverData }"
699 @showPopver="handleClick"
700 @popverBtnClick="handleClick"
701 />
702 <span
703 class="text_btn"
704 :class="{ 'is-disabled': !!btn.disabled }"
705 v-else
706 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
707 v-preReClick
708 >{{ btn.label }}</span>
709 </span>
710 </template>
711 </template>
712 </template> 530 </template>
713 <template v-else> 531 <template v-else>
714 <template 532 <template v-for="(btn, b) in Array.isArray(actionInfo.btns)
715 v-for="(btn, b) in Array.isArray(actionInfo.btns)
716 ? actionInfo.btns 533 ? actionInfo.btns
717 : actionInfo.btns(scope)" 534 : actionInfo.btns(scope)">
718 > 535 <span class="operate_btn" :class="{ active: btn.visible ?? true, 'sort-icon': btn.value == 'sort' }"
719 <span 536 v-if="btn.visible ?? true">
720 class="operate_btn" 537 <el-icon v-if="btn.value == 'sort'" style="width: 24px;height: 15px;vertical-align: text-top;">
721 :class="{ active: btn.visible ?? true, 'sort-icon': btn.value == 'sort' }" 538 <svg-icon style="width: 24px;height: 15px;" name="sort-drag" />
722 v-if="btn.visible ?? true" 539 </el-icon>
723 > 540 <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }"
724 <el-icon v-if="btn.value == 'sort'" style="width: 24px;height: 15px;vertical-align: text-top;"> 541 @showPopver="handleClick" @popverBtnClick="handleClick" />
725 <svg-icon style="width: 24px;height: 15px;" name="sort-drag" /> 542 <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else
726 </el-icon> 543 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)"
727 <BtnPopover 544 v-preReClick>{{ btn.label }}</span>
728 v-if="btn.value == 'authority'" 545 </span>
729 :popover-info="{ scope, btn, ...popverData }" 546 </template>
730 @showPopver="handleClick"
731 @popverBtnClick="handleClick"
732 />
733 <span
734 class="text_btn"
735 :class="{ 'is-disabled': !!btn.disabled }"
736 v-else
737 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)"
738 v-preReClick
739 >{{ btn.label }}</span>
740 </span>
741 </template>
742 </template> 547 </template>
743 548 <template v-if="
744 <template 549 props.tableInfo.id.indexOf('maintenance') > -1 &&
745 v-if=" 550 scope.row.isInit == 'N'
746 props.tableInfo.id.indexOf('maintenance') > -1 && 551 ">
747 scope.row.isInit == 'N' 552 <span class="text_btn" @click="handleClick(scope, { label: '初始化', value: 'init' })" v-preReClick>初始化</span>
748 "
749 >
750 <span
751 class="text_btn"
752 @click="handleClick(scope, { label: '初始化', value: 'init' })"
753 v-preReClick
754 >初始化</span
755 >
756 </template> 553 </template>
757 <template 554 <template v-else-if="
758 v-else-if=" 555 props.tableInfo.id.indexOf('product-menu') > -1 &&
759 props.tableInfo.id.indexOf('product-menu') > -1 && 556 scope.row.menuType != 'F'
760 scope.row.menuType != 'F' 557 ">
761 " 558 <span class="text_btn" @click="
762 > 559 handleClick(scope, { label: '添加子菜单', value: 'menu' })
763 <span 560 " v-preReClick>添加子菜单</span>
764 class="text_btn"
765 @click="
766 handleClick(scope, { label: '添加子菜单', value: 'menu' })
767 "
768 v-preReClick
769 >添加子菜单</span
770 >
771 </template> 561 </template>
772 </template> 562 </template>
773 </el-table-column> 563 </el-table-column>
774 <template #append> 564 <template #append>
775 <td :class="props.tableInfo.footerClass" v-if="props.tableInfo.footerHtml" :colspan="5" v-html="props.tableInfo.footerHtml"></td> 565 <td :class="props.tableInfo.footerClass" v-if="props.tableInfo.footerHtml" :colspan="5"
776 </template> 566 v-html="props.tableInfo.footerHtml"></td>
567 </template>
777 </el-table> 568 </el-table>
778 <PageNav 569 <PageNav v-if="showPage" :class="[pageInfo.type, pageInfo.col]" :pageInfo="pageInfo" @pageChange="pageChange" />
779 v-if="showPage"
780 :class="[pageInfo.type, pageInfo.col]"
781 :pageInfo="pageInfo"
782 @pageChange="pageChange"
783 />
784 </div> 570 </div>
785 </template> 571 </template>
786 572
...@@ -810,17 +596,18 @@ onMounted(() => { ...@@ -810,17 +596,18 @@ onMounted(() => {
810 } 596 }
811 } 597 }
812 } 598 }
599
813 .input_comb { 600 .input_comb {
814 > span:not(:last-child) { 601 >span:not(:last-child) {
815 margin-right: 12px; 602 margin-right: 12px;
816 603
817 > span { 604 >span {
818 margin-right: 4px; 605 margin-right: 4px;
819 } 606 }
820 } 607 }
821 608
822 > span:last-child { 609 >span:last-child {
823 > span { 610 >span {
824 margin-right: 4px; 611 margin-right: 4px;
825 } 612 }
826 } 613 }
...@@ -834,7 +621,7 @@ onMounted(() => { ...@@ -834,7 +621,7 @@ onMounted(() => {
834 padding-right: 4px; 621 padding-right: 4px;
835 position: relative; 622 position: relative;
836 623
837 & ~ .active { 624 &~.active {
838 padding-left: 4px; 625 padding-left: 4px;
839 margin-left: 1px; 626 margin-left: 1px;
840 627
...@@ -855,13 +642,14 @@ onMounted(() => { ...@@ -855,13 +642,14 @@ onMounted(() => {
855 } 642 }
856 } 643 }
857 } 644 }
858 .primary {
859 645
860 .el-table__cell { 646 .primary {
861 background: none; 647
648 .el-table__cell {
649 background: none;
650 }
862 } 651 }
863 } 652 }
864 }
865 653
866 .svg-title-icon { 654 .svg-title-icon {
867 width: 16px; 655 width: 16px;
...@@ -875,6 +663,7 @@ onMounted(() => { ...@@ -875,6 +663,7 @@ onMounted(() => {
875 &.icon-audit { 663 &.icon-audit {
876 color: #b2b2b2 664 color: #b2b2b2
877 } 665 }
666
878 svg { 667 svg {
879 width: 100%; 668 width: 100%;
880 height: 100%; 669 height: 100%;
...@@ -883,14 +672,13 @@ onMounted(() => { ...@@ -883,14 +672,13 @@ onMounted(() => {
883 672
884 .last-row { 673 .last-row {
885 display: flex; 674 display: flex;
886 height: 36px; 675 height: 36px;
887 line-height: 36px; 676 line-height: 36px;
888 background: #FFF1D4; 677 background: #FFF1D4;
889 border-bottom: 1px solid #d9d9d9; 678 border-bottom: 1px solid #d9d9d9;
890 border-right: 1px solid #d9d9d9; 679 border-right: 1px solid #d9d9d9;
891 flex-direction: row; 680 flex-direction: row;
892 justify-content: space-between; 681 justify-content: space-between;
893 padding: 0px 8px; 682 padding: 0px 8px;
894 } 683 }
895
896 </style> 684 </style>
......
...@@ -645,7 +645,7 @@ const templateInfo = ref({ ...@@ -645,7 +645,7 @@ const templateInfo = ref({
645 ], 645 ],
646 }) 646 })
647 const tabsInfo = ref({ 647 const tabsInfo = ref({
648 activeName: 'sheet', 648 activeName: 'field',
649 tabs: [ 649 tabs: [
650 { label: '库表', name: 'sheet' }, 650 { label: '库表', name: 'sheet' },
651 { label: '字段', name: 'field' }, 651 { label: '字段', name: 'field' },
...@@ -854,7 +854,28 @@ const fieldTableInfo = ref({ ...@@ -854,7 +854,28 @@ const fieldTableInfo = ref({
854 ...page.value, 854 ...page.value,
855 }, 855 },
856 actionInfo: { 856 actionInfo: {
857 show: false 857 label: "操作",
858 type: "btn",
859 width: 80,
860 btns: (scope) => {
861 let row = scope.row, btnArr: any = [
862 { label: "编辑", value: "edit" },
863 ];
864 // if (row.approveState == 'Y') {
865 // if (row.listingStatus == 'Y') {
866 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
867 // } else {
868 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
869 // }
870 // } else {
871 // if (row.approveState == 'A') {
872 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
873 // } else {
874 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
875 // }
876 // }
877 return btnArr;
878 },
858 }, 879 },
859 }) 880 })
860 881
...@@ -1096,7 +1117,7 @@ onBeforeMount(() => { ...@@ -1096,7 +1117,7 @@ onBeforeMount(() => {
1096 <div v-else-if="item.type == 'tag'"> 1117 <div v-else-if="item.type == 'tag'">
1097 <el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{ 1118 <el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
1098 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) 1119 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
1099 }}</el-tag> 1120 }}</el-tag>
1100 </div> 1121 </div>
1101 <span v-else> 1122 <span v-else>
1102 {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field] 1123 {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field]
...@@ -1105,6 +1126,20 @@ onBeforeMount(() => { ...@@ -1105,6 +1126,20 @@ onBeforeMount(() => {
1105 </span> 1126 </span>
1106 </template> 1127 </template>
1107 </el-table-column> 1128 </el-table-column>
1129 <el-table-column label="操作" :width="fieldTableInfo.actionInfo.width"
1130 :class-name="fieldTableInfo.actionInfo.columClass" fixed="right">
1131 <template #default="scope">
1132 <template v-for="(btn, b) in Array.isArray(fieldTableInfo.actionInfo.btns)
1133 ? fieldTableInfo.actionInfo.btns
1134 : fieldTableInfo.actionInfo.btns(scope)">
1135 <span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
1136 <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }"
1137 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : tableBtnClick(scope, btn)"
1138 v-preReClick>{{ btn.label }}</span>
1139 </span>
1140 </template>
1141 </template>
1142 </el-table-column>
1108 </el-table> 1143 </el-table>
1109 <PageNav :class="[fieldTableInfo.page.type, fieldTableInfo.page.col]" :pageInfo="fieldTableInfo.page" 1144 <PageNav :class="[fieldTableInfo.page.type, fieldTableInfo.page.col]" :pageInfo="fieldTableInfo.page"
1110 @pageChange="tablePageChange" /> 1145 @pageChange="tablePageChange" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!