分级分类任务更新
Showing
2 changed files
with
190 additions
and
367 deletions
| ... | @@ -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,68 +220,30 @@ onMounted(() => { | ... | @@ -220,68 +220,30 @@ 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" | ||
| 225 | :id="props.tableInfo.id" | ||
| 226 | :style="{ | ||
| 227 | height: props.tableInfo.height ?? '100%', | 224 | height: props.tableInfo.height ?? '100%', |
| 228 | 'min-height': props.tableInfo.minPanelHeight ?? '' | 225 | 'min-height': props.tableInfo.minPanelHeight ?? '' |
| 229 | }" | 226 | }"> |
| 230 | > | 227 | <el-table ref="tableRef" :class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }" |
| 231 | <el-table | 228 | :data="tableData" :highlight-current-row="props.tableInfo.heightlightRow ?? true" |
| 232 | ref="tableRef" | 229 | :show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border |
| 233 | :class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }" | ||
| 234 | :data="tableData" | ||
| 235 | :highlight-current-row=" props.tableInfo.heightlightRow ?? true" | ||
| 236 | :show-header="props.tableInfo.showHeader ?? true" | ||
| 237 | stripe | ||
| 238 | :border="props.tableInfo.border | ||
| 239 | ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')" | 230 | ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')" |
| 240 | :max-height="maxHeight" | 231 | :max-height="maxHeight" :row-key="rowKey" :current-row-key="currentRowKey" :row-class-name="rowClassName" |
| 241 | :row-key="rowKey" | 232 | v-loading="tableDataLoading" @row-click="rowClick" @row-dblclick="rowDblClick" @selection-change="selectionChange" |
| 242 | :current-row-key="currentRowKey" | 233 | @select="tableCheckboxSelectChange" @select-all="tableCheckboxAllSelectChange" |
| 243 | :row-class-name="rowClassName" | 234 | style="width: 100%; display: inline-block" :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }" |
| 244 | v-loading="tableDataLoading" | 235 | tooltip-effect="light" :tooltip-options="{ placement: 'top', popperClass: 'table_cell_tooltip' }" |
| 245 | @row-click="rowClick" | 236 | :show-summary="props.tableInfo.showSummary ?? false"> |
| 246 | @row-dblclick="rowDblClick" | 237 | <el-table-column type="selection" :width="32" align="center" v-if="multiple" :selectable="rowSelectable" |
| 247 | @selection-change="selectionChange" | 238 | :fixed="fixedSelection" /> |
| 248 | @select="tableCheckboxSelectChange" | 239 | <el-table-column v-for="item in tableFields" :label="item.label" :width="item.width" :min-width="item.minWidth" |
| 249 | @select-all="tableCheckboxAllSelectChange" | 240 | :fixed="item.fixed" :align="item.align" :type="item.type == 'index' ? '' : undefined" |
| 250 | style="width: 100%; display: inline-block" | 241 | :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass" |
| 251 | :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }" | 242 | :show-overflow-tooltip="item.type != 'switch'"> |
| 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> | 243 | <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" | ||
| 282 | :content="item.toolTipContent" | ||
| 283 | placement="top" | ||
| 284 | > | ||
| 285 | <el-icon style="color:#b2b2b2;"> | 247 | <el-icon style="color:#b2b2b2;"> |
| 286 | <QuestionFilled /> | 248 | <QuestionFilled /> |
| 287 | </el-icon> | 249 | </el-icon> |
| ... | @@ -303,39 +265,38 @@ onMounted(() => { | ... | @@ -303,39 +265,38 @@ 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)">{{ |
| 270 | item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) | ||
| 308 | }}</el-tag> | 271 | }}</el-tag> |
| 309 | <span v-else>{{ '--' }}</span> | 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 || '变化'" | ||
| 316 | :width="476" | ||
| 317 | trigger="hover" | ||
| 318 | @show="()=>popoverHover(scope,item)" | ||
| 319 | > | ||
| 320 | <template #reference> | 278 | <template #reference> |
| 321 | <span :class="{text_btn:item.checkName?item.checkName(scope):true}">{{ item.getName?item.getName(scope):"详情" }}</span> | 279 | <span :class="{ text_btn: item.checkName ? item.checkName(scope) : true }">{{ |
| 322 | </template> | 280 | item.getName ? item.getName(scope):"详情" }}</span> |
| 323 | <el-table :data="props.tableInfo.popoverData" v-loading="props.tableInfo.popoverloading" | 281 | </template> |
| 324 | class="tablePover" :row-class-name="tableRowClassName1" border tooltip-effect="light" :span-method="props.tableInfo?.arraySpanMethod"> | 282 | <el-table :data="props.tableInfo.popoverData" v-loading="props.tableInfo.popoverloading" class="tablePover" |
| 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 > | 283 | :row-class-name="tableRowClassName1" border tooltip-effect="light" |
| 284 | :span-method="props.tableInfo?.arraySpanMethod"> | ||
| 285 | <el-table-column v-for="col in item.column" :width="col.width" :property="col.field" :label="col.label" | ||
| 286 | :key="col.field" show-overflow-tooltip> | ||
| 326 | <template #default="scope"> | 287 | <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( |
| ... | @@ -346,18 +307,11 @@ onMounted(() => { | ... | @@ -346,18 +307,11 @@ onMounted(() => { |
| 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]] }} |
| ... | @@ -365,35 +319,24 @@ onMounted(() => { | ... | @@ -365,35 +319,24 @@ onMounted(() => { |
| 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=" | ||
| 432 | editForm[item.field] && editForm[item.field].type == 'input' | 367 | editForm[item.field] && editForm[item.field].type == 'input' |
| 433 | " | 368 | " v-model.trim="scope.row[item.field]" :placeholder="editForm[item.field].placeholder" |
| 434 | v-model.trim="scope.row[item.field]" | 369 | :clearable="editForm[item.field].clearable" :maxlength="editForm[item.field].maxlength ?? ''" :disabled="editForm[item.field].disabled && scope.row.guid !== undefined |
| 435 | :placeholder="editForm[item.field].placeholder" | 370 | " @input="inputKeyUp(editForm[item.field].regexp, scope, editForm[item.field])" |
| 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=" | ||
| 458 | editForm[item.field] && editForm[item.field].type == 'btn' | 385 | editForm[item.field] && editForm[item.field].type == 'btn' |
| 459 | " | 386 | "> |
| 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=" | ||
| 473 | editForm[item.field] && editForm[item.field].type == 'comb' | 394 | editForm[item.field] && editForm[item.field].type == 'comb' |
| 474 | " | 395 | "> |
| 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> |
| ... | @@ -570,7 +439,7 @@ onMounted(() => { | ... | @@ -570,7 +439,7 @@ onMounted(() => { |
| 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] |
| ... | @@ -588,21 +457,12 @@ onMounted(() => { | ... | @@ -588,21 +457,12 @@ onMounted(() => { |
| 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,63 +478,35 @@ onMounted(() => { | ... | @@ -618,63 +478,35 @@ 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 | > | ||
| 633 | <BtnPopover | ||
| 634 | v-if="btn.value == 'authority'" | ||
| 635 | :popover-info="{ scope, btn, ...popverData }" | ||
| 636 | @showPopver="handleClick" | ||
| 637 | @popverBtnClick="handleClick" | ||
| 638 | /> | ||
| 639 | <span | ||
| 640 | class="text_btn" | ||
| 641 | :class="{ 'is-disabled': !!btn.disabled }" | ||
| 642 | v-else | ||
| 643 | @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn):handleClick(scope, btn)" | ||
| 644 | v-preReClick | ||
| 645 | >{{ btn.label }}</span> | ||
| 646 | </span> | 492 | </span> |
| 647 | </template> | 493 | </template> |
| 648 | <span class="operate_btn active"> | 494 | <span class="operate_btn active"> |
| 649 | <el-dropdown trigger="hover" :show-timeout="50" > | 495 | <el-dropdown trigger="hover" :show-timeout="50"> |
| 650 | <span class="text_btn">...</span> | 496 | <span class="text_btn">...</span> |
| 651 | <template #dropdown> | 497 | <template #dropdown> |
| 652 | 498 | <el-dropdown-menu> | |
| 653 | <el-dropdown-menu > | ||
| 654 | <el-dropdown-item v-for="(btn, b) in Array.isArray(actionInfo.btns) | 499 | <el-dropdown-item v-for="(btn, b) in Array.isArray(actionInfo.btns) |
| 655 | ? actionInfo.btns.slice(4) | 500 | ? actionInfo.btns.slice(4) |
| 656 | : actionInfo.btns(scope).slice(4)"> | 501 | : actionInfo.btns(scope).slice(4)"> |
| 657 | <span | 502 | <span class="operate_btn" style="width: 100%; display: inline-block;" |
| 658 | class="operate_btn" | 503 | :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true"> |
| 659 | style="width: 100%; display: inline-block;" | 504 | <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }" |
| 660 | :class="{ active: btn.visible ?? true }" | 505 | @showPopver="handleClick" @popverBtnClick="handleClick" /> |
| 661 | v-if="btn.visible ?? true" | 506 | <span class="text_btn" style="width: 100%;display: block;" |
| 662 | > | 507 | :class="{ 'is-disabled': !!btn.disabled }" v-else |
| 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)" | 508 | @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)" |
| 675 | v-preReClick | 509 | v-preReClick>{{ btn.label }}</span> |
| 676 | >{{ btn.label }}</span | ||
| 677 | > | ||
| 678 | </span> | 510 | </span> |
| 679 | </el-dropdown-item> | 511 | </el-dropdown-item> |
| 680 | </el-dropdown-menu> | 512 | </el-dropdown-menu> |
| ... | @@ -683,104 +515,58 @@ onMounted(() => { | ... | @@ -683,104 +515,58 @@ onMounted(() => { |
| 683 | </span> | 515 | </span> |
| 684 | </template> | 516 | </template> |
| 685 | <template v-else> | 517 | <template v-else> |
| 686 | <template | 518 | <template v-for="(btn, b) in Array.isArray(actionInfo.btns) |
| 687 | v-for="(btn, b) in Array.isArray(actionInfo.btns) | ||
| 688 | ? actionInfo.btns | 519 | ? actionInfo.btns |
| 689 | : actionInfo.btns(scope)" | 520 | : actionInfo.btns(scope)"> |
| 690 | > | 521 | <span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true"> |
| 691 | <span | 522 | <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }" |
| 692 | class="operate_btn" | 523 | @showPopver="handleClick" @popverBtnClick="handleClick" /> |
| 693 | :class="{ active: btn.visible ?? true }" | 524 | <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else |
| 694 | v-if="btn.visible ?? true" | ||
| 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)" | 525 | @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)" |
| 707 | v-preReClick | 526 | v-preReClick>{{ btn.label }}</span> |
| 708 | >{{ btn.label }}</span> | ||
| 709 | </span> | 527 | </span> |
| 710 | </template> | 528 | </template> |
| 711 | </template> | 529 | </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" | ||
| 721 | :class="{ active: btn.visible ?? true, 'sort-icon': btn.value == 'sort' }" | ||
| 722 | v-if="btn.visible ?? true" | ||
| 723 | > | ||
| 724 | <el-icon v-if="btn.value == 'sort'" style="width: 24px;height: 15px;vertical-align: text-top;"> | 537 | <el-icon v-if="btn.value == 'sort'" style="width: 24px;height: 15px;vertical-align: text-top;"> |
| 725 | <svg-icon style="width: 24px;height: 15px;" name="sort-drag" /> | 538 | <svg-icon style="width: 24px;height: 15px;" name="sort-drag" /> |
| 726 | </el-icon> | 539 | </el-icon> |
| 727 | <BtnPopover | 540 | <BtnPopover v-if="btn.value == 'authority'" :popover-info="{ scope, btn, ...popverData }" |
| 728 | v-if="btn.value == 'authority'" | 541 | @showPopver="handleClick" @popverBtnClick="handleClick" /> |
| 729 | :popover-info="{ scope, btn, ...popverData }" | 542 | <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" v-else |
| 730 | @showPopver="handleClick" | 543 | @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : handleClick(scope, btn)" |
| 731 | @popverBtnClick="handleClick" | 544 | v-preReClick>{{ btn.label }}</span> |
| 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> | 545 | </span> |
| 741 | </template> | 546 | </template> |
| 742 | </template> | 547 | </template> |
| 743 | 548 | <template v-if=" | |
| 744 | <template | ||
| 745 | v-if=" | ||
| 746 | props.tableInfo.id.indexOf('maintenance') > -1 && | 549 | props.tableInfo.id.indexOf('maintenance') > -1 && |
| 747 | scope.row.isInit == 'N' | 550 | scope.row.isInit == 'N' |
| 748 | " | 551 | "> |
| 749 | > | 552 | <span class="text_btn" @click="handleClick(scope, { label: '初始化', value: 'init' })" v-preReClick>初始化</span> |
| 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=" | ||
| 759 | props.tableInfo.id.indexOf('product-menu') > -1 && | 555 | props.tableInfo.id.indexOf('product-menu') > -1 && |
| 760 | scope.row.menuType != 'F' | 556 | scope.row.menuType != 'F' |
| 761 | " | 557 | "> |
| 762 | > | 558 | <span class="text_btn" @click=" |
| 763 | <span | ||
| 764 | class="text_btn" | ||
| 765 | @click=" | ||
| 766 | handleClick(scope, { label: '添加子菜单', value: 'menu' }) | 559 | handleClick(scope, { label: '添加子菜单', value: 'menu' }) |
| 767 | " | 560 | " v-preReClick>添加子菜单</span> |
| 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" |
| 566 | v-html="props.tableInfo.footerHtml"></td> | ||
| 776 | </template> | 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,12 +642,13 @@ onMounted(() => { | ... | @@ -855,12 +642,13 @@ onMounted(() => { |
| 855 | } | 642 | } |
| 856 | } | 643 | } |
| 857 | } | 644 | } |
| 645 | |||
| 858 | .primary { | 646 | .primary { |
| 859 | 647 | ||
| 860 | .el-table__cell { | 648 | .el-table__cell { |
| 861 | background: none; | 649 | background: none; |
| 862 | } | 650 | } |
| 863 | } | 651 | } |
| 864 | } | 652 | } |
| 865 | 653 | ||
| 866 | .svg-title-icon { | 654 | .svg-title-icon { |
| ... | @@ -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%; |
| ... | @@ -892,5 +681,4 @@ onMounted(() => { | ... | @@ -892,5 +681,4 @@ onMounted(() => { |
| 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 | ||
| ... | @@ -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" /> | ... | ... |
-
Please register or sign in to post a comment