Эх сурвалжийг харах

共享公开指标的目录编辑控制

shanbinzhang 2 сар өмнө
parent
commit
59ea3c24eb

+ 8 - 2
src/views/dataEntry_manage/adjustdata/adjustData.vue

@@ -85,7 +85,7 @@
 							style="width: 120px"
 						/>
           </el-form-item>
-          <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
+          <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="isCreator">
             <cascader
               v-model="formData.menu"
               :options="classifyOptions"
@@ -212,6 +212,8 @@ export default {
 			isLookHistory: false,
 			lookEdbId: 0,
       EDBInfoOfCalculateData:{},
+
+      edbInfoDetail: {}
     }
   },
   computed: {
@@ -298,7 +300,10 @@ export default {
 		}),
     frequencyArr(){
         return frequencySelectList(['半年度'])
-    }
+    },
+    isCreator() {
+			return this.edbInfoDetail.SysUserId === parseInt(localStorage.getItem('AdminId'));
+		}
   },
 
   mounted() {
@@ -334,6 +339,7 @@ export default {
         EdbInfoId: this.edb_id,
       })
       if (res.Ret!==200) return 
+      this.edbInfoDetail = res.Data.Item;
       let arr = res.Data.Item.DataList ||[];
       this.old_edb_data = arr;
       this.formData = {

+ 8 - 3
src/views/dataEntry_manage/codecount/index.vue

@@ -66,7 +66,7 @@
 									</el-option>
 								</el-select>
 							</el-form-item>
-							<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
+							<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="isCreator">
 								<cascader
 								v-model="formData.menu"
 								:options="menuOptions"
@@ -196,6 +196,10 @@ export default {
 		frequencyArr(){
 			return frequencySelectList(['半年度'])
 		},
+
+		isCreator() {
+			return this.edbInfoDetail.SysUserId === parseInt(localStorage.getItem('AdminId'));
+		}
 	},
 	data () {
 		return {
@@ -225,7 +229,8 @@ export default {
 				sql_code: ''
 			},
 
-			operationTipShow:false
+			operationTipShow:false,
+			edbInfoDetail: {}
 		};
 	},
 	watch: {
@@ -293,7 +298,7 @@ export default {
 				
 				const { EdbInfoDetail,PythonCode } = res.Data;
 				const { EdbName,EdbNameEn,ClassifyId,Frequency,Unit,UnitEn } = EdbInfoDetail;
-
+				this.edbInfoDetail = EdbInfoDetail;
 				this.formData = {
 					edb_name: this.currentLang==='en'?EdbNameEn:EdbName,
 					menu: ClassifyId,

+ 11 - 4
src/views/dataEntry_manage/components/batchMoveDialog.vue

@@ -21,7 +21,11 @@
                     collapse-tags
                     placeholder="选择分类"
                     @change="handleFilter"
-                    :props="cascaderProps"
+                    :props="{
+                      ...cascaderProps,
+                      multiple: true,
+                      checkStrictly: !filterObj.relevanceChild
+                    }"
                     :show-all-levels="false"
                     :key="cascaderKey"
                     ref="classifyRef"
@@ -146,7 +150,10 @@
               clearable
               placeholder="选择新分类"
               style="width: 240px"
-              :props="cascaderProps"
+              :props="source==='chart'?cascaderProps:{
+                ...cascaderProps,
+                multiple: true,
+              }"
               ref="newClassifyRef"
             />
           </div>
@@ -351,7 +358,7 @@ export default {
 
         let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
         let ClassifyIdList = checkedClassify.length 
-          ? checkedClassify.map(_ => _.data.ClassifyId)
+          ? checkedClassify.map(_ => this.source==='edb'?_.data.ClassifyId:_.ChartClassifyId)
           : []
 
         let params = {
@@ -410,7 +417,7 @@ export default {
         } = this.filterObj;
         let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
         let ClassifyIdList = checkedClassify.length 
-          ? checkedClassify.map(_ => _.data.ClassifyId)
+          ? checkedClassify.map(_ => this.source==='edb'?_.data.ClassifyId:_.ChartClassifyId)
           : [];
         
         let res;

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/computedDialog.vue

@@ -209,7 +209,7 @@
 				<el-form-item :label="$t('Edb.Detail.e_unit')" prop="unit">
 					<selectUnit v-model="formData.unit" style="width: 340px" />
 				</el-form-item>
-				<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
+				<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="calulateForm.isCreator">
 					<cascader
 						v-model="formData.menu"
 						:options="options"

+ 9 - 9
src/views/dataEntry_manage/databaseComponents/diffusionIndexDia.vue

@@ -110,15 +110,15 @@
 				:disabled="type===53"
 			/>
           </el-form-item>
-          <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" style="margin-right: 40px;">
-			<cascader
-				v-model="formData.menu"
-				:options="options"
-				clearable
-				:placeholder="$t('Edb.InputHolderAll.input_menu')"
-				cascaderWidth="width: 340px"
-				:config="{ checkStrictly: true }"
-			/>
+          <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" style="margin-right: 40px;" v-if="operationForm.isCreator">
+						<cascader
+							v-model="formData.menu"
+							:options="options"
+							clearable
+							:placeholder="$t('Edb.InputHolderAll.input_menu')"
+							cascaderWidth="width: 340px"
+							:config="{ checkStrictly: true }"
+						/>
           </el-form-item>
           <el-form-item :label="$t('Edb.Detail.e_fre')" prop="frequency">
             <el-select

+ 2 - 2
src/views/dataEntry_manage/databaseComponents/fittingResidueDia.vue

@@ -147,8 +147,8 @@
           style="width: 70%"
           :placeholder="$t('Edb.InputHolderAll.input_name')"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
-		  <cascader
+        <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="operationForm.isCreator">
+		  		<cascader
             v-model="formData.menu"
             :options="options"
             cascaderWidth="width:70%"

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/jointTargetDia.vue

@@ -196,7 +196,7 @@
 				style="width: 70%"
 				:placeholder="$t('Edb.InputHolderAll.input_name')"></el-input>
 			</el-form-item>
-			<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
+			<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="params.isCreator">
 				<cascader
 					v-model="formData.menu"
 					:options="menuOptions"

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/operationDialog.vue

@@ -183,7 +183,7 @@
 							/>
 						</el-form-item>
 						<!-- 指标目录 -->
-						<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
+						<el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="operationForm.isCreator">
 							<cascader
 								v-model="formData.menu"
 								:options="options"

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/smoothEdbDialog.vue

@@ -134,7 +134,7 @@
                                     style="width: 340px" 
                                 />
                             </el-form-item>
-                            <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu">
+                            <el-form-item :label="$t('Edb.Detail.e_menu')" prop="menu" v-if="operationForm.isCreator">
                                 <cascader
                                 v-if="isOpenSmooth"
                                 v-model="formData.menu"

+ 10 - 4
src/views/dataEntry_manage/databaseList.vue

@@ -962,6 +962,10 @@ export default {
 			}
 		},
 
+		roleId() {
+			return parseInt(localStorage.getItem('AdminId'));
+		},
+
 		//指标详情,也就是tableData[0]
 		EdbData(){
 			return this.tableData[0]?this.tableData[0]:{Button:{},DataInsertConfig:{},DataList:[]}
@@ -1998,7 +2002,7 @@ export default {
 						end_date: item.EndDate
 					}
 				})
-				const { EdbInfoId,CalculateFormula,EdbName,EdbNameEn,Unit,UnitEn,Frequency,EmptyType,MaxEmptyType,Extra } = res.EdbInfoDetail;
+				const { EdbInfoId,CalculateFormula,EdbName,EdbNameEn,Unit,UnitEn,Frequency,EmptyType,MaxEmptyType,Extra,SysUserId } = res.EdbInfoDetail;
 				/* 公式和表单 */
 				this.calulateForm =  {
 					edb_id: EdbInfoId,
@@ -2010,12 +2014,13 @@ export default {
 					emptyType: EmptyType,
 					maxEmptyType: MaxEmptyType,
 					Extra,
-					view
+					view,
+					isCreator: SysUserId===this.roleId
 				};
 			} else  {
 				// 多指标求和求平均
 				if([81,82].includes(type)){
-					this.operationForm={...res,view}
+					this.operationForm={...res,view,isCreator: res.EdbInfoDetail.SysUserId===this.roleId}
 					this.showBatchComputedPop=true
 					return
 				}
@@ -2031,7 +2036,8 @@ export default {
 					unit: this.currentLang==='en'?dataInfo.UnitEn:dataInfo.Unit,
 					menu: menuArrId||[],
 					Extra:dataInfo.Extra,
-					view
+					view,
+					isCreator: dataInfo.SysUserId===this.roleId
 				}
 
 				this.operationForm = [23,24,37,53].includes(type)

+ 6 - 2
src/views/dataEntry_manage/editChart.vue

@@ -133,7 +133,7 @@
 							<i class="el-icon-question" style="color: #666" />
 						</el-tooltip>
 					</el-form-item>
-					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
+					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify" v-if="isCreator">
 						<el-cascader
 							v-model="chartInfo.classify"
 							:options="classifyOptions"
@@ -762,7 +762,11 @@ export default {
     computed:{
         UnitOptions(){
             return unitSelectList()
-        }
+        },
+
+				isCreator() {
+					return this.chartInfo.SysUserId === parseInt(localStorage.getItem('AdminId'));
+				},
     },
   data() {
     return {

+ 3 - 3
src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue

@@ -496,7 +496,7 @@ export default {
 
         let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
         let ClassifyIdList = checkedClassify.length 
-          ? checkedClassify.map(_ => _.data.ClassifyId)
+          ? checkedClassify.map(_ => _.data.ChartClassifyId)
           : []
 
         let params = {
@@ -558,7 +558,7 @@ export default {
 
           let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
           let ClassifyIdList = checkedClassify.length 
-            ? checkedClassify.map(_ => _.data.ClassifyId)
+            ? checkedClassify.map(_ => this.source==='edb'?_.data.ClassifyId:_.ChartClassifyId)
             : []
 
           this.checkedParams = this.source === 'chart'
@@ -603,7 +603,7 @@ export default {
 
           let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
           let ClassifyIdList = checkedClassify.length 
-            ? checkedClassify.map(_ => _.data.ClassifyId)
+            ? checkedClassify.map(_ => this.source==='edb'?_.data.ClassifyId:_.ChartClassifyId)
             : []
 
           this.checkedParams = this.source === 'chart'

+ 2 - 0
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -750,6 +750,8 @@ $titleColor:#333333;
       background-size: 100% 100%;
       position:relative;
       border: 4px solid transparent;
+      border-top: none;
+      border-bottom: none;
       transform-origin: 0 0;
       &#cover,&#back{
         /* width:898px; */