Selaa lähdekoodia

自定义分析布局

Karsa 1 vuosi sitten
vanhempi
commit
d13f8c1123

BIN
src/assets/img/icons/jump_ico.png


+ 10 - 0
src/routes/modules/chartRoutes.js

@@ -121,6 +121,16 @@ export default [
 				name:"上传文件",
 				component:()=>import('@/views/datasheet_manage/customAnalysis/addAnalysisSheet.vue')
 			},
+			{
+				path:"createTaregtBySheet",
+				name:"生成指标",
+				component:()=>import('@/views/datasheet_manage/customAnalysis/addAnalysisSheet.vue')
+			},
+			{
+				path:"lookTaregtBySheet",
+				name:"查看指标",
+				component:()=>import('@/views/datasheet_manage/customAnalysis/addAnalysisSheet.vue')
+			},
 		]
 	},
 

+ 2 - 0
src/utils/icon.js

@@ -65,4 +65,6 @@ export default {
 	no_view: require('@/assets/img/icons/no_view.png'),
 	/* 中英文切换 */
 	to_en: require('@/assets/img/icons/toEn.png'),
+	/* 跳转icon */
+	jupm_icon: require('@/assets/img/icons/jump_ico.png')
 }

+ 19 - 8
src/views/datasheet_manage/customAnalysis/addAnalysisSheet.vue

@@ -1,14 +1,15 @@
 <template>
   <div class="addSheet-wrap">
-    <div class="wrap-top">
-      <el-button type="text">选择指标</el-button>
-    </div>
-    
-    <div class="main">
-      <Sheet ref="sheetRef" :option="sheetConfig"/>
+    <div :class="['main',{'full-height':$route.path!=='/addAnalysisSheet'}]">
+      <div class="left-section">
+        <Sheet ref="sheetRef" :option="sheetConfig"/> 
+      </div>
+
+      <rightSection v-if="$route.path!=='/addAnalysisSheet'"/>
     </div>
 
-    <bottomSection/>
+    <!-- 上传文件 -->
+    <bottomSection v-if="$route.path==='/addAnalysisSheet'"/>
 
   </div>
 </template>
@@ -18,8 +19,9 @@ import * as sheetInterface from '@/api/modules/sheetApi.js';
 import Sheet from '../components/SheetExcel.vue';
 import { getSheetImage } from '../common/option';
 import bottomSection from './components/uploadBottomSection.vue'
+import rightSection from './components/rightSection.vue';
 export default {
-  components: { Sheet,bottomSection },
+  components: { Sheet,bottomSection,rightSection },
   data() {
     return {
       sheetConfig: {
@@ -118,8 +120,17 @@ export default {
     }
   }
   .main {
+    display: flex;
     position: relative;
     min-height: 700px;
+    .left-section {
+      position:relative;
+      flex:1;
+      margin-right: 20px;
+    }
+    &.full-height {
+      min-height: calc(100vh - 120px);
+    }
   }
 }
 </style>

+ 3 - 47
src/views/datasheet_manage/customAnalysis/components/createTarget.vue → src/views/datasheet_manage/customAnalysis/components/createTargetDia.vue

@@ -2,7 +2,7 @@
   <div v-dialogDrag v-show="isShow" >
     <div class="create-target-wrapper">
       <div class="header el-dialog__header">
-        <span>生成指标</span>
+        <span>编辑指标区域</span>
         <i class="el-icon-close" @click="cancelHandle"/>
       </div>
 
@@ -20,54 +20,11 @@
           <el-form-item label="数值序列" prop="valueSeries">
             <el-input v-model="formData.valueSeries"></el-input>
           </el-form-item>
-
-          <el-form-item label="指标名称" prop="edbName">
-						<el-input
-						v-model="formData.edbName"
-						style="width: 80%"
-						placeholder="指标名称"></el-input>
-					</el-form-item>
-					<el-form-item label="所属目录" prop="menu">
-						<el-cascader
-              v-model="formData.menu"
-              :options="options"
-              :props="{
-                label: 'ClassifyName',
-                value: 'ClassifyId',
-                children: 'Children',
-                emitPath: false
-              },"
-              style="width: 80%"
-              clearable
-              placeholder="请选择所属目录"
-            />
-					</el-form-item>
-					<el-form-item label="频率" prop="frequency">
-						<span slot="label">频率</span>
-						<el-select 
-						v-model="formData.frequency" 
-						placeholder="请选择频率" 
-						style="width:80%"
-						clearable>
-							<el-option
-								v-for="item in frequencyArr"
-								:key="item"
-								:label="item"
-								:value="item">
-							</el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="单位" prop="unit">
-						<span slot="label">单位</span>
-						<selectUnit 
-							v-model="formData.unit" 
-							style="width: 80%"
-						/>
-					</el-form-item>
         </el-form>
       </div>
 
       <div class="dia-bot">
+        <el-button type="primary">保存</el-button>
         <el-button>取消</el-button>
       </div>
     </div>
@@ -84,8 +41,7 @@ export default {
 				menu:'',
 				frequency: '',
 				unit:''
-			},
-      frequencyArr:['日度','周度','旬度','月度','季度','年度'],
+			}
     }
   },
   mounted(){

+ 170 - 0
src/views/datasheet_manage/customAnalysis/components/rightSection.vue

@@ -0,0 +1,170 @@
+<template>
+  <div class="right-section-wrapper">
+    <!-- 生成指标 -->
+    <div class="create-cont">
+      <div class="head">生成指标</div>
+      <div class="form-bottom">
+        <el-form
+          ref="diaForm"
+          label-position="top"
+          hide-required-asterisk
+          label-width="80px"
+          :model="formData"
+        >
+          <el-form-item prop="dateSeries">
+            <span slot="label">分类名称</span>
+            <el-input v-model="formData.dateSeries"></el-input>
+          </el-form-item>
+          <el-form-item prop="valueSeries">
+            <span slot="label">数值序列</span>
+            <el-input v-model="formData.valueSeries"></el-input>
+          </el-form-item>
+
+          <el-form-item prop="edbName">
+            <span slot="label">指标名称</span>
+            <el-input
+            v-model="formData.edbName"
+            placeholder="指标名称"></el-input>
+          </el-form-item>
+          <el-form-item prop="menu">
+            <span slot="label">所属目录</span>
+            <el-cascader
+              v-model="formData.menu"
+              :options="classifyOption"
+              style="width:100%"
+              :props="{
+                label: 'ClassifyName',
+                value: 'ClassifyId',
+                children: 'Children',
+                emitPath: false
+              }"
+              clearable
+              placeholder="请选择所属目录"
+            />
+          </el-form-item>
+          <el-form-item prop="frequency">
+            <span slot="label">频率</span>
+            <el-select 
+              v-model="formData.frequency" 
+              placeholder="请选择频率"
+              style="width:100%"
+              clearable
+            >
+              <el-option
+                v-for="item in frequencyArr"
+                :key="item"
+                :label="item"
+                :value="item">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="unit">
+            <span slot="label">单位</span>
+            <selectUnit 
+              v-model="formData.unit" 
+            />
+          </el-form-item>
+        </el-form>
+        <el-button type="primary" style="width:100%;margin-top:50px">保存</el-button>
+      </div>
+    </div>
+
+    <!-- 查看指标 -->
+    <!-- <div class="create-cont">
+      <ul class="edb-list">
+        <li class="edb-item" v-for="(item,index) in edbList" :key="index">
+          <span>{{item.EdbName}}</span>
+          <div class="item-right">
+            <i class="el-icon-edit" style="margin-right:10px" @click.stop="editEdbSettingHandle"/>
+            <img :src="$icons.jupm_icon" alt="">
+          </div>
+        </li>
+      </ul>
+    </div> -->
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      formData: {
+        dateSeries: '',
+        valueSeries: '',
+				edbName:'',
+				menu:'',
+				frequency: '',
+				unit:'',
+      },
+      frequencyArr:['日度','周度','旬度','月度','季度','年度'],
+      classifyOption: [],
+
+      edbList:[{EdbName:'111'}]
+    }
+  },
+  mounted(){
+
+  },
+  methods:{
+    /* 改变的依赖区域 */
+    editEdbSettingHandle() {
+
+    }
+  },
+}
+</script>
+<style scoped lang='scss'>
+@import"~@/styles/theme-vars.scss";
+.right-section-wrapper {
+  width: 360px;
+  flex-shrink: 0;
+  border-radius: 4px;
+  border: 1px solid #C8CDD9;
+  background: #FFF;
+  .create-cont {
+    .head {
+      padding: 14px;
+      text-align: center;
+      border-bottom: 1px solid #C8CDD9;
+    }
+    .form-bottom {
+      padding: 30px;
+    }
+
+    .edb-list {
+      padding: 30px;
+      .edb-item {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding: 14px 20px;
+        margin: 10px 0;
+        border-radius: 4px;
+        border: 1px solid #C8CDD9;
+        background: #FFF;
+        &.slect { 
+          border-color: $theme-color; background: #ECF2FE;
+        }
+        .item-right {
+          display: flex;
+          align-items: center;
+        }
+        .el-icon-edit {
+          font-size: 16px;
+          &:hover {
+            color: $theme-color;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
+}
+</style>
+<style lang="scss">
+.right-section-wrapper {
+  .el-form--label-top .el-form-item__label {
+    height: 20px;
+    line-height: 20px;
+  }
+} 
+</style>

+ 51 - 34
src/views/datasheet_manage/customAnalysis/components/uploadBottomSection.vue

@@ -2,7 +2,7 @@
   <div class="bottom-section">
 
     <!-- 无同名 -->
-    <div>
+    <!-- <div>
       <div class="page-list">
         <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange" style="margin-right:30px">全部</el-checkbox>
         <el-checkbox-group v-model="sheetChecked" @change="handleCheckedCitiesChange">
@@ -10,40 +10,56 @@
         </el-checkbox-group>
       </div>
 
-      <el-select 
-        v-model="classify"
-        placeholder="请选择表格目录"
-        clearable
-      >
-        <el-option
-          v-for="item in classifyArr"
-          :key="item.ExcelClassifyId"
-          :label="item.ExcelClassifyName"
-          :value="item.ExcelClassifyId"
-        />
-      </el-select>
-    </div>
+      <div>
+        <el-select 
+          v-model="classify"
+          placeholder="请选择表格目录"
+          clearable
+          style="width:350px;"
+        >
+          <el-option
+            v-for="item in classifyArr"
+            :key="item.ExcelClassifyId"
+            :label="item.ExcelClassifyName"
+            :value="item.ExcelClassifyId"
+          />
+        </el-select>
+        <el-button type="primary" style="margin-left:30px">保存</el-button>
+          <el-tooltip class="item" effect="dark" content="根据用户选择的sheet页上传文件" placement="top-start">
+          <i class="el-icon-warning"/>
+        </el-tooltip>
+      </div>
+    </div> -->
 
-  <!-- 有同名文件 -->
-  <!-- <div class="page-list" v-for="item in sheetPages" :key="item">
-    <span style="margin-right: 30px">{{item}}</span>
-    <el-radio v-model="item.checkType" :label="1">
-      新增sheet页
-      <el-tooltip class="item" effect="dark" content="已存在同名文件,该sheet页不同名,新增sheet页" placement="top-start">
-        <i class="el-icon-warning"/>
-      </el-tooltip>
-    </el-radio>
-    <el-radio v-model="item.checkType" :label="2">
-      替换sheet页
-      <el-tooltip class="item" effect="dark" content="已存在同名文件,该sheet页同名,替换sheet页内容" placement="top-start">
-        <i class="el-icon-warning"/>
-      </el-tooltip>
-    </el-radio>
-  </div> -->
+    <!-- 有同名文件 -->
+    <div>
+      <div class="same-page-item">
+        <label>
+          <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
+            <path d="M14.7136 12.8013L9.22087 2.90725C8.54904 1.69758 7.45106 1.69758 6.77941 2.90725L1.28669 12.8013C0.615035 14.0122 1.16452 15 2.5069 15H13.4933C14.8357 15 15.3846 14.0121 14.7136 12.8013ZM7.2457 5.71459C7.44308 5.49263 7.69402 5.38164 8.00006 5.38164C8.30627 5.38164 8.55698 5.49146 8.75456 5.71015C8.95086 5.92933 9.04898 6.20343 9.04898 6.53305C9.04898 6.81664 8.63924 8.902 8.50257 10.4191H7.51565C7.39579 8.90199 6.95119 6.81664 6.95119 6.53305C6.95122 6.20844 7.0495 5.93546 7.2457 5.71459ZM8.74074 12.9285C8.53313 13.1387 8.28608 13.2435 8.00013 13.2435C7.71426 13.2435 7.46714 13.1387 7.25956 12.9285C7.05256 12.7186 6.94967 12.4645 6.94967 12.166C6.94967 11.8691 7.05256 11.6123 7.25956 11.397C7.46714 11.1816 7.71426 11.0739 8.00013 11.0739C8.28608 11.0739 8.53313 11.1816 8.74074 11.397C8.94761 11.6123 9.05074 11.8691 9.05074 12.166C9.05074 12.4645 8.94761 12.7186 8.74074 12.9285Z" fill="#E37318"/>
+          </svg>
+          下列sheet页同名,勾选可替换页面内容
+          <span style="color:#999">(不勾选则拼接原内容+上传内容,不去重)</span>
+        </label>
+        <div class="page-list">
+          <el-radio v-model="item.checked" v-for="item in sheetPages" :key="item">{{item}}</el-radio>
+        </div>
+      </div>
+      <div class="same-page-item">
+        <label>
+          <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
+            <path d="M14.7136 12.8013L9.22087 2.90725C8.54904 1.69758 7.45106 1.69758 6.77941 2.90725L1.28669 12.8013C0.615035 14.0122 1.16452 15 2.5069 15H13.4933C14.8357 15 15.3846 14.0121 14.7136 12.8013ZM7.2457 5.71459C7.44308 5.49263 7.69402 5.38164 8.00006 5.38164C8.30627 5.38164 8.55698 5.49146 8.75456 5.71015C8.95086 5.92933 9.04898 6.20343 9.04898 6.53305C9.04898 6.81664 8.63924 8.902 8.50257 10.4191H7.51565C7.39579 8.90199 6.95119 6.81664 6.95119 6.53305C6.95122 6.20844 7.0495 5.93546 7.2457 5.71459ZM8.74074 12.9285C8.53313 13.1387 8.28608 13.2435 8.00013 13.2435C7.71426 13.2435 7.46714 13.1387 7.25956 12.9285C7.05256 12.7186 6.94967 12.4645 6.94967 12.166C6.94967 11.8691 7.05256 11.6123 7.25956 11.397C7.46714 11.1816 7.71426 11.0739 8.00013 11.0739C8.28608 11.0739 8.53313 11.1816 8.74074 11.397C8.94761 11.6123 9.05074 11.8691 9.05074 12.166C9.05074 12.4645 8.94761 12.7186 8.74074 12.9285Z" fill="#E37318"/>
+          </svg>
+          下列sheet页不同名,勾选可新增sheet页
+          <span style="color:#999">(不勾选则不新增)</span>
+        </label>
+        <div class="page-list">
+          <el-radio v-model="item.checked" v-for="item in sheetPages" :key="item">{{item}}</el-radio>
+        </div>
+      </div>
 
-  <div class="btn-bottom">
-    <el-button type="primary">保存</el-button>
-  </div>
+      <el-button type="primary">保存</el-button>
+    </div>
 
   </div>
 </template>
@@ -71,13 +87,14 @@ export default {
 <style scoped lang='scss'>
 .bottom-section {
   background: #fff;
-  padding: 15px;
+  padding: 20px 20px 50px;
   border-radius: 4px;
   box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
   .page-list  {
     display: flex;
     align-items: center;
     margin: 10px 0;
+    margin-bottom: 30px;
   }
   .btn-bottom {
     margin-top: 20px;

+ 23 - 0
src/views/datasheet_manage/customAnalysis/createTargetEditor.vue

@@ -0,0 +1,23 @@
+<template>
+  <div>
+
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+
+    }
+  },
+  mounted(){
+
+  },
+  methods:{
+
+  },
+}
+</script>
+<style scoped lang='scss'>
+
+</style>

+ 7 - 16
src/views/datasheet_manage/customAnalysis/list.vue

@@ -12,7 +12,11 @@
         <div class="datasheet_top">
           <el-button v-permission="permissionBtn.etaTablePermission.etaTable_excel"
             type="primary" style="margin-right:20px" @click="goAddSheetHandle"
-          >上传文件</el-button >
+          >上传文件</el-button>
+          
+          <el-button>
+            <el-checkbox v-model="isShowMe"  @change="() => { getTreeData();getPublicList() }">只看我的</el-checkbox>
+          </el-button>
         </div>
         <div class="search-cont">
           <el-select
@@ -208,7 +212,6 @@
           <div class="sheet-wrap">
             <Sheet
               ref="sheetRef"
-              v-if="sheetDetailInfo.Source === 1"
               :option="{
                 data: [{
                   ...JSON.parse(sheetDetailInfo.Content),
@@ -223,20 +226,6 @@
                 Source: sheetDetailInfo.Source
               }"
             />
-
-            <!-- 自定义表格  -->
-            <CustomTable
-              v-else-if="sheetDetailInfo.Source === 2"
-              :sheetType="sheetDetailInfo.ExcelType"
-              :disabled="true"
-              ref="customTableRef"
-            />
-
-            <MixedTable
-              v-else-if="sheetDetailInfo.Source === 3"
-              :disabled="true"
-              ref="mixedTableRef"
-            />
           </div>
         </div>
 
@@ -393,6 +382,8 @@ export default {
           { required: true, message: "表格分类不能为空", trigger: "blur" },
         ],
       },
+
+      isShowMe: false
     };
   },
   watch: {