Prechádzať zdrojové kódy

数据模板操作列按钮样式调整

cfort 2 rokov pred
rodič
commit
e40161af0c

+ 0 - 88
src/business/platform/data/templaterender/components/import-columns-dialog.vue

@@ -386,94 +386,6 @@ export default {
                 return trimStr
             }
             switch (formKey) {
-                case 'lhwljbxx':
-                    // 物料基本信息
-                    await curdPost('sql', gysmlSql).then(gysmlRes => {
-                        const gysmlDatas = gysmlRes.variables.data
-                        tableData.forEach(data => {
-                            const obj = {}
-                            for (var d in data) {
-                                for (var f in fields) {
-                                    if (d === fields[f]) {
-                                        if (fields[f] == '供应商') {
-                                            var gysID = gysmlDatas.filter((v) => {
-                                                return trim(v.gong_ying_shang_m) == trim(data[d])
-                                            }).length !== 0 ? gysmlDatas.filter((v) => {
-                                                    return trim(v.gong_ying_shang_m) == trim(data[d])
-                                                })[0].id_ : ''
-                                            obj[f] = gysID
-                                        } else {
-                                            obj[f] = trim(data[d])
-                                        }
-                                    }
-                                }
-                            }
-                            saveData.push(obj)
-                        })
-                    })
-                    break
-                case 'lhkcglxq':
-                    // 库存管理
-                    await curdPost('sql', gysmlSql).then(gysmlRes => {
-                        const gysmlDatas = gysmlRes.variables.data
-                        tableData.forEach(data => {
-                            const obj = {}
-                            for (var d in data) {
-                                for (var f in fields) {
-                                    if (d === fields[f]) {
-                                        if (fields[f] == '供应商') {
-                                            var gysID = gysmlDatas.filter((v) => {
-                                                return trim(v.gong_ying_shang_m) == trim(data[d])
-                                            }).length !== 0 ? gysmlDatas.filter((v) => {
-                                                    return trim(v.gong_ying_shang_m) == trim(data[d])
-                                                })[0].id_ : ''
-                                            obj[f] = gysID
-                                        } else {
-                                            obj[f] = trim(data[d])
-                                        }
-                                        if (obj[f] == '技术验收') {
-                                            obj['jiShuYanShou'] = '已技术验收'
-                                        }
-                                    }
-                                }
-                            }
-                            obj['shiFouJiangGuoQiJ'] = '0'
-                            obj['shiFouYiBaoFei'] = '0'
-                            obj['shiFouYiGuoQi'] = '0'
-                            saveData.push(obj)
-                        })
-                    })
-                    break
-                case 'llckwlxx':
-                    // 领料物料信息
-                    await curdPost('sql', gysmlSql).then(gysmlRes => {
-                        const gysmlDatas = gysmlRes.variables.data
-                        tableData.forEach(data => {
-                            const obj = {}
-                            for (var d in data) {
-                                for (var f in fields) {
-                                    if (d === fields[f]) {
-                                        if (fields[f] == '供应商') {
-                                            var gysID = gysmlDatas.filter((v) => {
-                                                return trim(v.gong_ying_shang_m) == trim(data[d])
-                                            }).length !== 0 ? gysmlDatas.filter((v) => {
-                                                    return trim(v.gong_ying_shang_m) == trim(data[d])
-                                                })[0].id_ : ''
-                                            obj[f] = gysID
-                                        } else {
-                                            obj[f] = trim(data[d])
-                                        }
-                                        // if (obj[f] == '技术验收') {
-                                        //   obj['jiShuYanShou'] = '已技术验收'
-                                        // }
-                                    }
-                                }
-                            }
-                            obj['biaoMing'] = 't_crkjlx'
-                            saveData.push(obj)
-                        })
-                    })
-                    break
                 default:
                     tableData.forEach(data => {
                         const obj = {}

+ 1 - 1
src/business/platform/data/templaterender/templates/list.vue

@@ -1306,7 +1306,7 @@ export default {
             if (this.$utils.isNotEmpty(manageButtons)) {
                 rowHandle = {
                     // effect: this.manageEffect ? 'display' : 'default',
-                    effect: this.template.attrs.manage_effect === 'Y' ? 'display' : 'default',
+                    effect: this.template.attrs.manage_effect !== 'Y' ? 'display' : 'default',
                     actions: manageButtons,
                     columnHeader: this.template.attrs.manage_effect === 'Y' || this.template.attrs.manage_effect === 'N' ? null : this.template.attrs.manage_effect,
                     colWidth: this.template.attrs.col_width

+ 7 - 7
src/components/ibps-crud/index.vue

@@ -318,7 +318,7 @@
                     v-if="rowHandle"
                     v-bind="rowHandle"
                     :label=" handleAttribute(rowHandle.columnHeader,'操作') "
-                    :width="rowHandle.colWidth ? rowHandle.colWidth : (handleAttribute(rowHandle.width, rowHandleDefaultWidth) < 80 ? '80' : rowHandle.actions.length !== 0 && rowHandle.actions.length <= 3 ? 90 + 60 * (rowHandle.actions.length - 1) : 90)"
+                    :width="rowHandle.colWidth ? rowHandle.colWidth : (handleAttribute(rowHandle.width, rowHandleDefaultWidth) < 80 ? '80' : rowHandle.actions.length !== 0 && rowHandle.actions.length <= 3 ? 90 + 60 * (rowHandle.actions.length - 1) : 90 + 60 * 2)"
                     :fixed="handleAttribute(rowHandle.fixed, 'right')"
                     :align="handleAttribute(rowHandle.align, 'center')"
                 >
@@ -327,7 +327,6 @@
                         <template v-if="hasRowHandleActions(scope.row)">
                             <template v-if="rowHandle.effect ==='display'">
                                 <ibps-toolbar
-                                    v-if="!rowHandleMoreActions || rowHandleMoreActions.length <=1"
                                     :actions="rowHandleActions"
                                     :socpe="thatSocpe"
                                     :data="scope.row"
@@ -335,7 +334,7 @@
                                     type="link"
                                     @action-event="handleActionEvent"
                                 />
-                                <template v-if="rowHandleMoreActions && rowHandleMoreActions.length ==1">
+                                <template v-if="rowHandleMoreActions && rowHandleMoreActions.length === 1">
                                     <div class="el-divider el-divider--vertical" />
                                     <ibps-toolbar
                                         :actions="rowHandleMoreActions"
@@ -346,12 +345,14 @@
                                         @action-event="handleActionEvent"
                                     />
                                 </template>
-                                <template v-if="rowHandleMoreActions && rowHandleMoreActions.length >1">
+                                <template v-if="rowHandleMoreActions && rowHandleMoreActions.length > 1">
+                                    <div class="el-divider el-divider--vertical" />
                                     <el-dropdown>
-                                        <i class="el-icon-caret-bottom el-dropdown-link" style="font-size:14px;">更多</i>
+                                        <!-- <i class="el-icon-caret-bottom el-dropdown-link" style="font-size:14px;">更多</i> -->
+                                        <i class="ibps-icon ibps-icon-chevron-down" style="font-size:12px; color: #409eff; cursor: pointer;"> 更多</i>
                                         <el-dropdown-menu slot="dropdown" class="ibps-table-dropdown-menu">
                                             <ibps-toolbar
-                                                :actions="rowHandleMoreActions.concat(rowHandleActions)"
+                                                :actions="rowHandleMoreActions"
                                                 :socpe="thatSocpe"
                                                 :data="scope.row"
                                                 position="manage"
@@ -376,7 +377,6 @@
                                         />
                                     </el-dropdown-menu>
                                 </el-dropdown>
-
                                 <span>&nbsp;</span>
                             </template>
                         </template>

+ 4 - 4
src/components/ibps-toolbar/index.vue

@@ -42,7 +42,7 @@
                 />
             </template>
             <template v-else-if="type==='linkHide'">
-                <p>
+                <div :key="button.key+index" style="margin-top: 5px;">
                     <el-link
                         v-if="handleActionHidden(button.hidden)"
                         :key="button.key+index"
@@ -54,7 +54,7 @@
                     >
                         {{ `&nbsp;${button.label}` }}
                     </el-link>
-                </p>
+                </div>
             </template>
             <template v-else>
                 <!--下拉-->
@@ -76,7 +76,7 @@
                                 :key="menu.key"
                                 :command="menu"
                                 :icon="getIcon(menu)"
-                            >{{ getLabel(menu) }}</el-dropdown-item>
+                            >{{ `&nbsp;${getLabel(menu)}` }}</el-dropdown-item>
                         </el-dropdown-menu>
                     </el-dropdown>
                 </template>
@@ -93,7 +93,7 @@
                         :disabled="handleActionDisabled(button.disabled)"
                         :autofocus="false"
                         @click="emitEventHandler('action-event',button,position,data,index)"
-                    >{{ getLabel(button) }}</el-button>
+                    >{{ `&nbsp;${getLabel(button)}` }}</el-button>
                 </template>
             </template>
         </template>

+ 1 - 3
src/utils/common.js

@@ -15,7 +15,6 @@ import { removeFormData } from '@/api/platform/data/dataTemplate'
 // 引入工具类
 import Utils from '@/utils/util'
 import ActionUtils from '@/utils/action'
-import AuthUtils from '@/utils/auth'
 
 // base64解码
 const decode = str => decodeURIComponent(window.atob(str).split('').map(c => `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`).join(''))
@@ -177,6 +176,5 @@ export default {
     removeFormData,
     replaceNullWithEmpty,
     Utils,
-    ActionUtils,
-    AuthUtils
+    ActionUtils
 }