Kaynağa Gözat

优化卡片

hml 5 ay önce
ebeveyn
işleme
3f08046fe8

BIN
src/assets/images/generator/cardInfo1.jpg


BIN
src/assets/images/generator/cardInfo4.jpg


+ 47 - 49
src/components/CardTemplate/index.vue

@@ -32,7 +32,7 @@
               </el-tooltip>
             </div>
           </div>
-          <div v-if="cardInfo.info.data.length > 0" style="padding:15px" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
+          <div v-if="cardInfo.info.data.length > 0" style="padding: 15px" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
             <el-row :gutter="10">
               <el-col v-for="(item, index) in cardInfo.info.data" :key="index" :span="cardInfo.info.col">
                 <div class="flex-row" :style="infoStyle">
@@ -54,7 +54,7 @@
               <div class="btns">
                 <template v-for="(item, i) in btnList">
                   <template v-if="item.value == 'edit'">
-                    <el-button size="mini" type="text" :key="i" :disabled="config.webType == 3 && [1, 2, 5].indexOf(data.flowState) > -1" @click="columnBtnsHandel(item.value, data)"
+                    <el-button size="mini" type="text" :key="i" :disabled="config.webType == 3 && [1, 2, 5].indexOf(data.flowState) > -1" @click="columnBtnsHandel(item.value, dataInfo)"
                       >{{ item.label }}
                     </el-button>
                   </template>
@@ -83,11 +83,6 @@
                 <el-checkbox v-model="dataInfo.checked" @change="checkChange"></el-checkbox>
               </div>
             </div>
-            <div v-else>
-              <el-button size="mini" type="text">操作1 </el-button>
-              <el-button size="mini" type="text">操作2 </el-button>
-              <el-button size="mini" type="text">操作3 </el-button>
-            </div>
           </div>
         </el-card>
       </div>
@@ -111,8 +106,8 @@
               </el-tooltip>
             </div>
           </div>
-          <el-image class="img" :style="{ height: cardInfo.imgHeight + 'px' }" :src="imgVal(dataInfo)" alt="" />
-          <div v-if="cardInfo.info.data.length > 0" style="padding:15px" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
+          <el-image class="img" :style="{ height: cardInfo.imgHeight + 'px', width: '94%', marginLeft: '3%' }" :src="imgVal(dataInfo)" alt="" />
+          <div v-if="cardInfo.info.data.length > 0" style="padding: 15px" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
             <el-row :gutter="10">
               <el-col v-for="(item, index) in cardInfo.info.data" :key="index" :span="cardInfo.info.col">
                 <div class="flex-row" :style="infoStyle">
@@ -122,9 +117,9 @@
                       <div slot="content">
                         {{ getModelName(item, dataInfo, 'info') }}
                       </div>
-                      <span>
+                      <div>
                         {{ getModelName(item, dataInfo, 'info') }}
-                      </span>
+                      </div>
                     </el-tooltip>
                   </div>
                 </div>
@@ -163,11 +158,6 @@
                 <el-checkbox v-model="dataInfo.checked" @change="checkChange"></el-checkbox>
               </div>
             </div>
-            <div v-else>
-              <el-button size="mini" type="text">操作1 </el-button>
-              <el-button size="mini" type="text">操作2 </el-button>
-              <el-button size="mini" type="text">操作3 </el-button>
-            </div>
           </div>
         </el-card>
       </div>
@@ -182,24 +172,21 @@
             </div>
             <div class="flex-right">
               <div class="item-left" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
-                <div v-if="cardInfo.info.data.length > 0">
-                  <el-row :gutter="10">
-                    <el-col v-for="(item, index) in cardInfo.info.data" :key="index" :span="cardInfo.info.col">
-                      <div class="flex-row" :style="infoStyle">
-                        <div class="left" v-if="item.text != ''">{{ item.text + ':' }}</div>
-                        <div class="right">
-                          <el-tooltip v-if="item.model != ''" effect="dark" placement="right-start">
-                            <div slot="content">
-                              {{ getModelName(item, dataInfo, 'info') }}
-                            </div>
-                            <span>
-                              {{ getModelName(item, dataInfo, 'info') }}
-                            </span>
-                          </el-tooltip>
+                <div v-if="cardInfo.info.data.length > 0" :style="infoStyle">
+                  <div class="item-row" v-for="(item, index) in cardInfo.info.data" :key="index">
+                    <div class="left" v-if="item.text != ''">{{ item.text + ':' }}</div>
+                    <div class="right">
+                      <!-- {{ getModelName(item, dataInfo, 'info') }} -->
+                      <el-tooltip v-if="item.model != ''" effect="dark" placement="right-start">
+                        <div slot="content">
+                          {{ getModelName(item, dataInfo, 'info') }}
                         </div>
-                      </div>
-                    </el-col>
-                  </el-row>
+                        <span>
+                          {{ getModelName(item, dataInfo, 'info') }}
+                        </span>
+                      </el-tooltip>
+                    </div>
+                  </div>
                 </div>
               </div>
               <div class="item-right">
@@ -228,20 +215,6 @@
                     <el-checkbox v-model="dataInfo.checked" @change="checkChange"></el-checkbox>
                   </div>
                 </div>
-                <div class="item-footer" v-else>
-                  <div class="item-btns">
-                    <el-button size="mini" type="primary">编辑 </el-button>
-                  </div>
-                  <div class="item-btns">
-                    <el-button size="mini" type="danger">删除 </el-button>
-                  </div>
-                  <div class="item-btns">
-                    <el-button size="mini" type="warning">详情 </el-button>
-                  </div>
-                  <div class="check">
-                    <el-checkbox disabled></el-checkbox>
-                  </div>
-                </div>
               </div>
             </div>
           </div>
@@ -280,7 +253,7 @@
               </el-tooltip> -->
             </div>
           </div>
-          <div v-if="cardInfo.info.data.length > 0" style="padding:15px" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
+          <div v-if="cardInfo.info.data.length > 0" style="padding: 15px" :style="cardInfo.info.class != '' && cardInfo.info.class ? JSON.parse(cardInfo.info.class) : {}">
             <el-row :gutter="10">
               <el-col v-for="(item, index) in cardInfo.info.data" :key="index" :span="cardInfo.info.col">
                 <div class="flex-row" :style="infoStyle">
@@ -302,7 +275,9 @@
               <div class="btns">
                 <template v-for="(item, i) in btnList">
                   <template v-if="item.value == 'edit'">
-                    <el-button size="mini" :key="i" :disabled="config.webType == 3 && [1, 2, 5].indexOf(data.flowState) > -1" @click="columnBtnsHandel(item.value, data)">{{ item.label }} </el-button>
+                    <el-button size="mini" :key="i" :disabled="config.webType == 3 && [1, 2, 5].indexOf(data.flowState) > -1" @click="columnBtnsHandel(item.value, dataInfo)"
+                      >{{ item.label }}
+                    </el-button>
                   </template>
                   <template v-if="item.value == 'remove'">
                     <el-button
@@ -660,7 +635,11 @@ export default {
   white-space: nowrap;
   margin-bottom: 10px;
   .right {
+    max-width: 200px;
     margin-left: 6px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
   }
 }
 .footer {
@@ -694,6 +673,25 @@ export default {
   display: flex;
   .item-left {
     width: 70%;
+    overflow: hidden;
+    .item-row {
+      // width: 100%;
+      display: flex;
+      flex-wrap: nowrap;
+      // overflow: hidden;
+      // text-overflow: ellipsis;
+      // white-space: nowrap;
+      .left {
+        width: 30%;
+      }
+      .right {
+        max-width: 100px;
+        margin-left: 6px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+    }
   }
   .item-right {
     flex: 1;

+ 1 - 1
src/components/ColumnDesign/index.vue

@@ -773,7 +773,7 @@ export default {
       showFalg: 'Btns',
       typeList: [
         {
-          url: require('@/assets/images/generator/card1.png'),
+          url: require('@/assets/images/generator/card4.png'),
           value: 1,
           name: '普通表格'
         },

+ 1 - 1
src/components/Dataset-filter/util.js

@@ -438,7 +438,7 @@ export const getTabelAPIData = (filter, enumId, formAllVar, componentList, type,
                 let config = o
                 // 查询当前绑定的api返回值key和value
                 obnj = config.ApiReturn.find((z) => z.varName === i.varType[1])
-                if (!obnj) return
+                if (!obnj) returnz
                 if (!o.value) return
                 // console.log(o.__slot__.options)
                 let matrix = o.options

+ 1 - 1
src/components/Generator/components/NewDivider/index.vue

@@ -4,7 +4,7 @@
       <svg-divider :svgStyle="svgStyle"></svg-divider>
     </div>
     <div v-else-if="type == '1'">
-      <img v-if="svgUrl != ''" :style="{ width: svgWidth + 'px', height: '40px' }" :src="define.comUrl + '/' + svgUrl" alt="" />
+      <img v-if="svgUrl != ''" :style="{ width: '1120px', height: '40px' }" :src="define.comUrl + '/' + svgUrl" alt="" />
       <div v-else style="height: 30px"></div>
     </div>
   </div>

+ 1 - 1
src/views/basic/dynamicModel/list/index.vue

@@ -390,7 +390,7 @@
           :cardData="cardData"
           :config="config"
         ></CardTemplate>
-        <div class="pager">
+        <div class="pager" style="position: absolute; bottom: 10px;right:20px; width: 100%">
           <vxe-pager
             v-if="columnData.hasPage"
             background