Преглед изворни кода

Merge branch 'master' of http://8.136.199.33:3000/eta_front/eta_front

Karsa пре 1 година
родитељ
комит
a77c1dad49

+ 3 - 2
src/views/classify_manage/classifyEnlist.vue

@@ -176,7 +176,7 @@
       <reportVarietyEnSet ref="varietyIns" :checked="checkedVariety" v-if="showSetVariety" />
       </div>
       <div style="text-align:center;padding:10px 0 30px 0">
-        <el-button type="primary" plain @click="showSetVariety=false">取消</el-button>
+        <el-button type="primary" plain @click="showSetVariety=false;checkedVariety=[]">取消</el-button>
         <el-button type="primary" style="margin-left:20px" @click="handleSaveVariety">保存</el-button>
       </div>
     </el-dialog>
@@ -334,8 +334,9 @@ export default {
 
   methods: {
     handleShowSetVariety(item){
+      console.log(item.EnPermissions);
       this.activeItem=item
-      this.checkedVariety=item.EnPermissions||[]
+      this.checkedVariety=item.EnPermissions?JSON.parse(JSON.stringify(item.EnPermissions)):[]
       this.showSetVariety=true
     },
     handleSaveVariety(){

+ 780 - 0
src/views/dataEntry_manage/databaseComponents/smoothEdbDialog.vue

@@ -0,0 +1,780 @@
+<template>
+    <!-- 指数修匀计算弹窗 -->
+    <el-dialog
+        :visible.sync="isOpenSmooth"
+        :close-on-click-modal="false"
+        :modal-append-to-body="false"
+        @close="cancelHandle"
+        center
+        width="1200px"
+        top="3vh"
+        v-dialogDrag
+        class="smooth-edb-dialog"
+    >
+        <div slot="title" style="display: flex; align-items: center">
+            <img
+                :src="$icons.computed"
+                style="color: #fff; width: 16px; height: 16px; margin-right: 5px"
+            />
+            <span style="font-size: 16px">指数修匀</span>
+        </div>
+        <div class="smooth-edb-dialog-wrap">
+            <!-- 常规计算 -->
+            <div class="normal-wrap" v-if="computedSource===1">
+                <div class="min-top">
+                    <label >选择指标:</label>
+                    <el-select
+                        v-model="select_target"
+                        v-loadMore="searchLoad"
+                        :filterable="!select_target"
+                        clearable
+                        placeholder="请输入指标名称"
+                        style="width: 85%"
+                        remote
+                        :remote-method="getTarget"
+                        @click.native="inputFocusHandle"
+                        @change="chooseTarget"
+                        @blur="search_have_more = false"
+                        :disabled="operationForm.view"
+                    >
+                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
+                        <el-option
+                            v-for="item in searchOptions"
+                            :key="item.EdbInfoId"
+                            :label="$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
+                            :value="item.EdbInfoId"
+                        >
+                        </el-option>
+                    </el-select>
+                    <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="handleSelectBtnClick" v-if="select_target"/>
+                    
+                </div>
+                <div class="middle">
+                    <label>已选指标:</label>
+                    <el-table
+                        :data="tableData"
+                        style="box-shadow: 0px 3px 6px rgba(155, 170, 219, 0.2);margin-top:10px;"
+                        border>
+                        <el-table-column
+                            v-for="item in tableColums"
+                            :key="item.label"
+                            :label="item.label"
+                            :width="item.widthsty"
+                            :min-width="item.minwidthsty"
+                            align="center"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ scope.row[item.key] }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            width="110"
+                            align="center"
+                            label="操作"
+                            v-if="!operationForm.view"
+                        >
+                            <template slot-scope="scope">
+                                <span class="deletesty" @click="delTarget">删除</span>
+                            </template>
+                        </el-table-column>
+                        <div slot="empty" style="padding:20px 0 30px;">
+                            <tableNoData text="暂无指标" size="mini"/>
+                        </div>
+                    </el-table>
+                    <ul 
+                        class="data-ul" 
+                        ref="dataUl" 
+                        @scroll="scrollHandle"
+                        v-if="dataList.length">
+                        <li
+                            class="value-item"
+                            v-for="(item, index) in dataList"
+                            :key="item.EdbDataId"
+                        >
+                            <span class="value-label">
+                                <i class="new-tag" v-if="index === 0"></i>
+                                {{item.DataTime}}
+                            </span>
+                            <span class="value-label" style="min-width:200px;text-align:center;">{{item.Value}}</span>
+                        </li>
+                    </ul>
+                    <div class="form-cont">
+                        <el-form
+                            ref="form"
+                            label-position="right"
+                            inline
+                            label-width="80px"
+                            :model="formData"
+                            :rules="formRules"
+                            :disabled="operationForm.view"
+                        >
+                            <el-form-item label="指标名称" prop="targetName">
+                                <el-input
+                                    v-model="formData.targetName"
+                                    style="width: 340px"
+                                    placeholder="请输入指标名称"
+                                />
+                            </el-form-item>
+                            <el-form-item label="单位" prop="unit">
+                                <selectUnit 
+                                    v-model="formData.unit" 
+                                    style="width: 340px" 
+                                />
+                            </el-form-item>
+                            <el-form-item label="指标目录" prop="menu">
+                                <el-cascader v-if="isOpenSmooth"
+                                    v-model="formData.menu"
+                                    :options="catalogArr"
+                                    :props="levelProps"
+                                    clearable
+                                    placeholder="请选择指标目录"
+                                />
+                            </el-form-item>
+                            <el-form-item label="频度" prop="frequency">
+                                <el-select
+                                    v-model="formData.frequency"
+                                    placeholder="请选择频度"
+                                    style="width: 340px"
+                                    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="alpha值" prop="alphaValue">
+                                <el-input
+                                    v-model.trim="formData.alphaValue"
+                                    style="width: 340px"
+                                    placeholder="请输入alpha值"
+                                />
+                            </el-form-item>
+                        </el-form>
+                    </div>
+                </div>
+            </div>
+            <!-- 批量计算 -->
+            <div class="batch-wrap" v-else>
+                <ul class="target-ul">
+                    <li class="target-li" v-for="(list, index) in targetList" :key="index">
+                        <span class="li-tag">{{ list.tag }}</span>
+                        <el-select v-model="list.target" v-loadMore="searchLoad" :filterable="!list.target" clearable
+                            placeholder="请输入指标名称" style="width: 400px" @change="(val)=>{chooseTargetList(val,index)}"
+                            @clear="clearHandle(index)" remote :remote-method="getTarget"
+                            @click.native="inputFocusHandle">
+                            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+                            <el-option v-for="item in searchOptions" :key="item.EdbInfoId"
+                                :label="$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
+                                :value="item.EdbInfoId">
+                            </el-option>
+                        </el-select>
+                        <i class="el-icon-tickets" style="color:#409EFF;font-size:18px"
+                            @click="$emit('lookHistory',list.target)" v-if="list.target" />
+                        <i class="el-icon-error del-tag" v-if="index > 1" @click="delTargetList(index)" />
+                        <span class="target-date" v-if="list.start_date">{{
+                            `${list.start_date}至${list.end_date}`
+                        }}</span>
+                    </li>
+                </ul>
+                <span class="add-icon" @click="addTargetHandle">
+                    <i class="el-icon-circle-plus-outline" style="color: #5882ef; font-size: 16px" />
+                    添加更多指标
+                </span>
+                <ul class="form-ul">
+                    <li class="form-li" v-for="(list, index) in targetList" :key="index">
+                        <span class="li-tag">{{ list.tag }}</span>
+                        <el-form :ref="`list_form_${index}`"
+                            label-position="right"
+                            inline
+                            label-width="0px"
+                            :model="targetList[index]"
+                            :rules="formRules"
+                        >
+                            <el-form-item prop="targetName">
+                                <el-input
+                                    v-model="targetList[index].targetName"
+                                    style="width: 240px"
+                                    placeholder="请输入指标名称"
+                                />
+                            </el-form-item>
+                            <el-form-item prop="menu">
+                                <el-cascader v-if="isOpenSmooth"
+                                    v-model="targetList[index].menu"
+                                    :options="catalogArr"
+                                    :props="levelProps"
+                                    style="width: 200px" 
+                                    clearable
+                                    placeholder="请选择指标目录"
+                                />
+                            </el-form-item>
+                            <el-form-item prop="unit">
+                                <selectUnit 
+                                    v-model="targetList[index].unit" 
+                                    style="width: 160px" 
+                                />
+                            </el-form-item>
+                            <el-form-item prop="alphaValue">
+                                <el-input
+                                    v-model.trim="targetList[index].alphaValue"
+                                    style="width: 180px"
+                                    placeholder="请输入alpha值"
+                                />
+                            </el-form-item>
+                            <el-form-item prop="frequency">
+                                <el-select
+                                    v-model="targetList[index].frequency"
+                                    placeholder="请选择频度"
+                                    style="width: 180px"
+                                    clearable
+                                >
+                                    <el-option
+                                        v-for="item in frequencyArr"
+                                        :key="item"
+                                        :label="item"
+                                        :value="item"
+                                    >
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            
+                        </el-form>
+                    </li>
+                </ul>
+            </div>
+            <div class="dia-bot" v-if="!operationForm.view">
+                <el-button
+                    type="primary"
+                    style="margin-right: 20px"
+                    @click="saveBtnClick"
+                    :loading="loading"
+                    >指数修匀计算</el-button
+                >
+                <el-button type="primary" plain @click="cancelHandle(operationForm.edb_id?'':'cancel')">取消</el-button>
+            </div>
+            <el-popover
+                placement="top-start"
+                width="500"
+                trigger="click">
+                <p style="padding:30px;line-height:25px;" v-html="$parent.tips.get('alpha')"/>
+                <span slot="reference" class="tip-label">公式说明</span>
+            </el-popover>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import { dataBaseInterface } from '@/api/api.js';
+import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
+import { formRules } from './util';
+const tag_arr = [];
+for(let i=0;i<26;i++) tag_arr.push(String.fromCharCode(65+i));
+export default {
+    props:{
+        isOpenSmooth:{
+            type:Boolean,
+            default:false
+        },
+        computedSource:{ //常规 or 批量
+            type:Number,
+            default:1
+        },
+        operationForm:{
+            type:Object,
+            default:()=>{return{
+                edb_id:'',
+                oldedb_id:''
+            }}
+        },
+        isPredict:{ //是不是预测指标
+            type:Boolean,
+            default:false,
+        }
+    },
+    data() {
+        return {
+            /* 常规 */
+            formData:{
+                targetName:'',
+                unit:'',
+                menu:'',
+                frequency:'',
+                alphaValue:''
+            },
+            formRules,
+            frequencyArr: ['日度', '周度','旬度', '月度', '季度', '年度'],
+            catalogArr:[],
+            levelProps: {
+                label: 'ClassifyName',
+                value: 'ClassifyId',
+                children: 'Children',
+                emitPath: false,
+            },
+
+            select_target:'',
+            search_page:1,
+            search_have_more:false,
+            searchOptions:[],
+            current_search:'',
+
+            tableData:[],
+            page_no:1,
+            haveMore:false,
+            tableColums:[
+                    {
+                    label: '指标ID',
+                    key: 'EdbCode',
+                },
+                {
+                    label: '指标名称',
+                    key: 'EdbName',
+                },
+                {
+                    label: '频度',
+                    key: 'Frequency',
+                },
+                {
+                    label: '单位',
+                    key: 'Unit',
+                },
+                {
+                    label: '起始时间',
+                    key: 'StartDate',
+                    minwidthsty: '100px'
+                },
+                {
+                    label: '更新时间',
+                    key: 'ModifyTime',
+                    minwidthsty: '110px'
+                },
+                {
+                    label: '来源',
+                    key: 'SourceName',
+                },
+            ],
+            dataList:[],
+
+            /* 批量 */
+            targetList:[/* {
+                tag:'A',
+                target:123456 //edbid 
+                ...formData
+            } */],
+            formDataList:[],
+
+            loading:false,
+        };
+    },
+    watch:{
+        isOpenSmooth(newVal){
+            if(newVal){
+                this.getMenu()
+                if(this.operationForm.edb_id){
+                    this.select_target = this.operationForm.oldedb_id
+                    this.getDataList()
+                    this.setDefaultOption(this.operationForm,'edit')
+                    //回显时的默认options
+                    this.searchOptions = [
+                        {
+                            EdbInfoId: this.operationForm.oldedb_id,
+                            EdbName: this.operationForm.oldEdb_name,
+                        }
+                    ]
+                }
+                if(this.computedSource===2){
+                    this.addTargetHandle()
+                    this.addTargetHandle()
+                }
+            }
+        }
+    },
+    methods: {
+        init(){
+            this.$refs.form&&(this.$refs.form.resetFields());
+            Object.assign(this.$data, this.$options.data());
+        },
+        searchLoad() {
+            if(!this.search_have_more) return;
+            this.searchApi(this.current_search,++this.search_page)
+        },
+        async searchApi(query,page=1){
+            const params = {
+                KeyWord:query,
+                CurrentIndex: page,
+            }
+            const res = this.isPredict
+                ? await preDictEdbInterface.edbSearch(params)
+                : await dataBaseInterface.targetSearchByPage(params)
+            if(res.Ret !== 200) return
+            const { List,Paging } = res.Data;
+            this.search_have_more = page < Paging.Pages;
+            let arr = page === 1 ? List : this.searchOptions.concat(List);
+            this.searchOptions = arr;
+        },
+        /* 指标列表 */
+        getTarget(query) {
+            this.search_page = 1;
+            this.current_search = query;
+            this.searchApi(this.current_search);
+        },
+        /* 聚焦获取当前检索 */
+        inputFocusHandle(e) {
+            this.search_page = 1;
+            this.current_search = e.target.value;
+            this.searchApi(this.current_search);
+        },
+        /* 获取目录结构 */
+        async getMenu() {
+            const res = this.isPredict
+                ? await preDictEdbInterface.classifyListV2()
+                : await dataBaseInterface.menuListV3()
+            if(res.Ret!==200) return 
+            this.catalogArr = res.Data.AllNodes || [];
+        },
+        /* 选择指标 */
+        chooseTarget(val) {
+            if(val) {
+                let obj = this.searchOptions.find(item => item.EdbInfoId === val);
+                //同步指标信息
+                this.setDefaultOption(obj);
+                this.page_no = 1;
+                this.dataList.length ? this.$refs.dataUl.scrollTop = 0 : null;
+                this.getDataList()
+            }else {
+                this.tableData = [];
+                this.dataList = [];
+            }
+        },
+        chooseTargetList(val,index){
+            if(val){
+                const obj = this.searchOptions.find(item => item.EdbInfoId === val);
+                this.targetList[index].targetName = `${obj.EdbName}指数修匀`
+                this.targetList[index].unit = obj.Unit
+                this.targetList[index].frequency = obj.Frequency
+                this.targetList[index].menu = obj.ClassifyId||''
+                this.targetList[index].alphaValue =obj.Formula||''
+            }
+        },
+        setDefaultOption(obj,type){
+            this.formData = {
+                targetName:`${obj.EdbName}${type==='edit'?'':'指数修匀'}`,
+                unit:obj.Unit,
+                frequency:obj.Frequency,
+                menu:obj.ClassifyId||'',
+                alphaValue:obj.Formula||''
+            }
+        },
+        async getDataList(){
+            const params = {
+                PageSize: 10,
+                CurrentIndex: this.page_no,
+                EdbInfoId: this.select_target,
+            }
+            const res = this.isPredict
+                ? await preDictEdbInterface.edbDataInfo(params)
+                : await dataBaseInterface.targetList(params)
+            if(res.Ret!==200) return 
+            if(res.Data){
+                res.Data.Item.ModifyTime = res.Data.Item.ModifyTime.substr(0,10);
+                this.tableData = [res.Data.Item] || [];
+                this.haveMore =  this.page_no < res.Data.Paging.Pages ? true : false;
+                this.dataList = this.page_no === 1 ? (res.Data.Item.DataList || []) : this.dataList.concat(res.Data.Item.DataList);
+            }else{
+                this.tableData = [];
+                this.dataList = [];
+            }
+        },
+        handleSelectBtnClick(){
+            //计算指标打开弹窗,基础指标打开新页面
+            if(this.tableData[0].EdbType===2){
+                this.$emit('lookHistory',this.select_target)
+            }else{
+                const {ClassifyId,UniqueCode,EdbInfoId} = this.tableData[0]
+                let {href} = this.$router.resolve({path:`/database`,query:{code:UniqueCode,id:EdbInfoId,classifyId:ClassifyId}});
+                window.open(href,'_blank');
+            }
+        },
+        scrollHandle(e){
+            const dom = e.target
+            let scrollTop = dom.scrollTop; //滑入屏幕上方的高度
+            let windowHeitht = dom.clientHeight; //页面的高度
+            let scrollHeight = dom.scrollHeight; //整个div的高度
+            let total = scrollTop + windowHeitht
+            if(total >= scrollHeight && this.haveMore){
+                this.page_no ++;
+                this.getDataList();
+            }
+        },
+        /* 删除已选指标 */
+		delTarget() {
+			this.tableData = [];
+			this.dataList = [];
+			this.select_target = '';
+			this.page_no = 1;
+		},
+        delTargetList(index){
+            this.targetList.splice(index, 1);
+        },
+        clearHandle(index){
+            const item = {...{tag:tag_arr[index],target:''},..._.cloneDeep(this.formData)}
+            this.targetList.splice(index,1,item)
+        },
+        
+        addTargetHandle(){
+            if(this.targetList.length >= 26){
+                this.$message.warning('添加指标个数已达上限')
+                return 
+            }
+            let tag = 'A'
+            let index = -1
+            if(this.targetList.length>=1){
+                tag = this.targetList[this.targetList.length-1].tag;
+                index = tag_arr.findIndex(item => item === tag);
+            }
+            const item = {...{tag:tag_arr[index+1],target:''},..._.cloneDeep(this.formData)}
+            this.targetList.push(item)
+        },
+        saveBtnClick(){
+            this.computedSource===1?this.saveHandle():this.saveListHandle()
+        },
+        //常规编辑/保存指标
+        async saveHandle(){
+            if(!this.select_target){
+                this.$message.warning('指标不能为空')
+                return
+            }
+            await this.$refs.form.validate();
+            this.loading = true;
+
+            const {targetName,unit,menu,frequency,alphaValue} = this.formData
+            let params = {
+                Source:this.$route.path==='/database'?72:73,
+                EdbName:targetName,
+                Unit:unit,
+                ClassifyId:menu,
+                Frequency:frequency,
+                Formula:alphaValue,
+                FromEdbInfoId:this.select_target
+            }
+
+            let res = null
+            if(this.isPredict){
+                let edit_params = { ...params,EdbInfoId: this.operationForm.edb_id }
+                res = await preDictEdbInterface.operateEdbSave(this.operationForm.edb_id ? edit_params : params)
+            }else{
+                res = this.operationForm.edb_id 
+                ? await dataBaseInterface.calculateTargetEdit({ ...params,EdbInfoId: this.operationForm.edb_id })
+                : await dataBaseInterface.calculateTargetSave(params)
+            }
+            if(res.Ret!==200) return 
+            this.$message.success(res.Msg)
+            this.operationForm.edb_id 
+                ? this.$emit('addCallBack','edit') 
+                : this.$emit('addCallBack','add',{ code:res.Data.UniqueCode,id:res.Data.EdbInfoId,classifyId:params.ClassifyId });
+            this.init();
+            this.loading = false;
+
+        },
+        //批量添加指标
+        async saveListHandle(){
+            //只添加选择了指标的
+            const targetCheck = this.targetList.filter(item=>item.target)
+            /* if(targetCheck.length!==this.targetList.length){
+                this.$message.warning('请选择指标')
+                return
+            } */
+            //只验证选择了指标的form-rules
+            for(let i = 0;i<targetCheck.length;i++){
+                const index = tag_arr.findIndex(item=>item===targetCheck[i].tag)
+                await this.$refs[`list_form_${index}`][0].validate();
+            }
+
+            this.loading = true
+            const params = targetCheck.map(item=>{
+                return {
+                    CalculateId: item.tag,
+                    CalculateInfo: {
+                        ClassifyId: item.menu,
+                        EdbName: item.targetName,
+                        Formula: item.alphaValue,
+                        Frequency:item.frequency,
+                        FromEdbInfoId: item.target,
+                        Source:this.$route.path==='/database'?72:73,
+                        Unit: item.unit
+                    }
+                }
+            })
+
+            const res = this.$route.path==='/database'
+                ? await dataBaseInterface.batchCalculateTargetAdd(params)
+                : await preDictEdbInterface.batchCalculateTargetAdd(params)
+            if(res.Ret !== 200) return
+            const { Fail,Success } = res.Data;
+            if(Fail.length) {
+                let message = '';
+                Fail.forEach(item => {
+                    message+=`${item.CalculateId}:${item.Msg}</br>`
+                })
+
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message,
+                    type: 'error'
+                })
+                this.dealFailHandle(Fail)
+            }else {
+                this.$message.success('添加成功');
+                this.init();
+                this.$emit('addCallBack','add',{ code:Success[0].UniqueCode,id:Success[0].EdbInfoId,classifyId:Success[0].ClassifyId});
+                this.loading = false;
+            }
+        },
+        dealFailHandle(arr){
+            //从targetList中剔除成功的指标,重新赋予剩下的指标tag
+            const failTagArr = arr.map(_ =>_.CalculateId);
+            this.targetList = this.targetList.filter(_ => failTagArr.includes(_.tag));
+            this.targetList.forEach((item,index)=>{
+                item.tag = tag_arr[index]
+            })
+            this.loading = false;
+        },
+        cancelHandle(type) {
+            this.init();
+            this.$emit('cancel');
+            type==='cancel' && this.$emit('openPrev');
+        },
+    },
+};
+</script>
+
+<style lang="scss">
+.smooth-edb-dialog{
+    .el-dialog__body{
+        padding: 25px 25px 30px !important;
+        padding-bottom: 5px !important;
+    }
+}
+.smooth-edb-dialog-wrap{
+    .el-cascader .el-input {
+        width: 340px;
+    }
+    .min-top {
+        padding: 20px 30px;
+        border: 1px solid #ECECEC;
+        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
+        border-radius:4px;
+    }
+    .middle {
+        margin-top: 20px;
+        .data-ul {
+            margin-top: 5px;
+            border-bottom: 1px solid #dcdfe6;
+            max-height: 140px;
+            overflow-y: auto;
+            .value-item {
+                padding: 14px 0;
+                border: 1px solid #dcdfe6;
+                border-bottom: none;
+                display: flex;
+                justify-content: space-around;
+                .value-label {
+                    position: relative;
+                    color: #666;
+                }
+                .new-tag {
+                    width: 6px;
+                    height: 6px;
+                    display: inline-block;
+                    position: absolute;
+                    left: -12px;
+                    top: 50%;
+                    transform: translateY(-50%);
+                    border-radius: 50%;
+                    background: #f00;
+                }
+            }
+        }
+        .form-cont {
+            padding-top: 30px;
+            margin-top: 30px;
+            border-top: 1px dashed #AAB4CC;
+            input::-webkit-outer-spin-button,
+            input::-webkit-inner-spin-button {
+                    -webkit-appearance: none;
+            }
+            input[type="number"]{
+                -moz-appearance: textfield;
+            }
+        }
+    }
+    .dia-bot {
+        padding: 20px 0 30px;
+        display: flex;
+        justify-content: center;
+    }
+    .tip-label {
+        position: absolute;
+        bottom: 30px;
+        right: 30px;
+        color: #409EFF;
+        cursor: pointer;
+    }
+    .batch-wrap{
+        padding:0 40px;
+        .target-ul {
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: space-between;
+            .target-li {
+                position: relative;
+                margin-bottom: 30px;
+                .li-tag {
+                    font-size: 16px;
+                    margin-right: 8px;
+                }
+                .del-tag {
+                    position: absolute;
+                    right: -30px;
+                    top: 12px;
+                    font-size: 16px;
+                    cursor: pointer;
+                }
+                .target-date {
+                    color: #5882ef;
+                    position: absolute;
+                    bottom: -25px;
+                    left: 24px;
+                }
+            }
+        }
+        .add-icon {
+            font-size: 16px;
+            color: #5882ef;
+            cursor: pointer;
+        }
+        .form-ul {
+            padding-top: 20px;
+            margin-top: 20px;
+            border-top: 1px dashed #AAB4CC;
+            .form-li {
+                display: flex;
+                align-items: center;
+                margin-bottom: 15px;
+                .el-cascader>.el-input{
+                    width:100%;
+                }
+                .el-form-item{
+                    margin-bottom: 0;
+                }
+                .li-tag{
+                    margin-right: 20px;
+                }
+            }
+        }
+    }
+    
+}
+</style>

+ 23 - 1
src/views/dataEntry_manage/databaseComponents/util.js

@@ -20,6 +20,16 @@ export const formRules= {
 	],
 	calendar_type: [
 		{ required: true, message: '日历不能为空',trigger: 'blur' }
+	],
+	alphaValue:[
+		{ validator:(rule,value,callback)=>{
+			if(Number(value)<=0||Number(value)>=1){
+				callback(new Error("请输入>0,<1的数值"))
+			}else{
+				callback()
+			}
+		},trigger:['change','blur']},
+		{ required:true,message:'alpha值不能为空',trigger:'blur'},
 	]
 }
 
@@ -88,6 +98,10 @@ export const computedTypes = [
 	{
 		name: '累计值',
 		type: 'accumulate'
+	},
+	{
+		name:'指数修匀',
+		type:'alpha'
 	}
 ]
 
@@ -124,6 +138,10 @@ export const computedBatchTypes = [
 	{
 		name: '累计值',
 		type: 'accumulate'
+	},
+	{
+		name:'指数修匀',
+		type:'alpha'
 	}
 ]
 
@@ -396,5 +414,9 @@ export const formulaTip = new Map([
 	日度数据年初至今:日期同原日度数据。将每年1月1日(含)到日度数据所在日期(含)之间的日度值,进行加总。<br>
 	周度数据年初至今:日期同原周度数据。将周度值转成日度频率,空值用插值法插值,然后算法同日度年度至今,再除以7<br>
 	月度/季度数据年初至今:日期同原月度/季度数据,将每年1月1日(含)到月度数据所在日期(含)之间的月度/季度值,进行加总<br>
-	以此类推`]
+	以此类推`],
+	['alpha',`指数修匀计算公式:<br>
+	1、设定指数修匀值序列的初始值=原来时间序列的初始值 <br>
+	2、选择平滑系数alpha值:在0-1之间,开区间 <br>
+	3、本期指数修匀值=alpha*本期实际值+(1-alpha)*上期指数修匀值`]
 ])

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

@@ -448,7 +448,16 @@
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
     />
-
+		<!-- 指数修匀弹窗 -->
+		<SmoothEdbDialog 
+			:is-open-smooth="computed_type==='alpha'"
+			:computed-source="computed_source"
+			:operationForm="operationForm"
+			@cancel="computed_type=0"
+			@openPrev="isOpenComputed=true"
+			@addCallBack="addComputedCallBack"
+			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+		/>
 	</div>
 </template>
 
@@ -476,10 +485,11 @@ import updateNewestDataDia from './databaseComponents/updateNewestDia.vue';
 import EdbLabelList from '@/components/edbLabelList.vue';
 import chartTrendRender from './databaseComponents/chartTrendRender.vue';
 import edbDetailData from './databaseComponents/edbDetailData.vue';
+import SmoothEdbDialog from './databaseComponents/smoothEdbDialog.vue';
 export default {
 	name: '',
-	components: { 
-		openDialog, 
+	components: {
+		openDialog,
 		addTargetDiaBase,
 		completeTargetDia,
 		computedDialog,
@@ -498,7 +508,8 @@ export default {
 		updateNewestDataDia,
 		EdbLabelList,
 		chartTrendRender,
-		edbDetailData
+		edbDetailData,
+		SmoothEdbDialog
 	},
 	directives: {
     drag(el, bindings) {
@@ -842,6 +853,9 @@ export default {
 						this.defaultWarn = type=== 'search' ? '未搜索到该指标' : '请在左侧选择指标'
 
 						this.$refs.menuTree.setCurrentKey(null)
+						// 清除当前的label
+						this.deleteLabel({code:this.select_node,id:this.selected_edbid,classifyId:''})
+						
 					}
 					if(type==='refresh') {
 						if(this.$refs.edb_detail_data){
@@ -1174,6 +1188,7 @@ export default {
 					if(res.Ret === 200) {
 						this.setComputedDialogForm(data.Source,node,data,res.Data);
 						this.computed_type = [23,24].includes(data.Source) ? 'joint' : data.Source;
+						this.computed_type = [72,73].includes(data.Source)? 'alpha': data.Source;
 					}
 				})
 
@@ -1655,6 +1670,7 @@ export default {
 				if(res.Ret !== 200) return
 				this.setComputedDialogForm(Source,node,data,res.Data,true);
 				this.computed_type = [23,24].includes(Source) ? 'joint' : Source;
+				this.computed_type = [72,73].includes(data.Source)? 'alpha': data.Source;
 			})
 		},
 
@@ -1727,6 +1743,17 @@ export default {
 							moveVal: type === 22 ? dataInfo.CalculateFormula : '',
 							calendar_type: type === 35 ? dataInfo.Calendar : '',
 					}
+
+				if([72,73].includes(type)){
+					const {EdbName,EdbInfoId,Frequency,Unit,ClassifyId,CalculateFormula} = dataInfo
+					this.operationForm = {
+						edb_id: EdbInfoId,
+						oldedb_id: old_edb[0].FromEdbInfoId,
+						oldEdb_name: old_edb[0].FromEdbName,
+						EdbName,Frequency,Unit,ClassifyId,Formula:CalculateFormula,
+						view
+					}
+				}
 			}
 		},
 

+ 30 - 3
src/views/predictEdb_manage/predictEdb.vue

@@ -407,6 +407,17 @@
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
     />
+	<!-- 指数修匀弹窗 -->
+	<SmoothEdbDialog 
+			:is-open-smooth="computed_type==='alpha'"
+			:computed-source="computed_source"
+			:operationForm="operationForm"
+			:isPredict="true"
+			@cancel="computed_type=0"
+			@openPrev="isOpenComputed=true"
+			@addCallBack="addComputedCallBack"
+			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+		/>
 
 	</div>
 </template>
@@ -432,6 +443,7 @@ import diffusionIndexDialog from '@/views/dataEntry_manage/databaseComponents/di
 import { formulaTip } from '@/views/dataEntry_manage/databaseComponents/util';
 import dataAssociateChart from '@/views/dataEntry_manage/databaseComponents/dataAssociateChart.vue'
 import dataAssociateComputeData from '@/views/dataEntry_manage/databaseComponents/dataAssociateComputeData.vue'
+import SmoothEdbDialog from '@/views/dataEntry_manage/databaseComponents/smoothEdbDialog.vue';
 
 export default {
 	name:'',
@@ -451,7 +463,8 @@ export default {
 		batchComputedDialog,
 		diffusionIndexDialog,
 		dataAssociateChart,
-		dataAssociateComputeData
+		dataAssociateComputeData,
+		SmoothEdbDialog
 	},
 	mixins:[ leftMixin ],
 	beforeRouteLeave (to, from, next) {
@@ -545,6 +558,7 @@ export default {
 				[64,formulaTip.get(61)],
 				[65,formulaTip.get(62)],
 				[66,formulaTip.get(63)],
+				['alpha',formulaTip.get('alpha')]
 			]),//公式说明
 
 			isShowRuleDialog: false,
@@ -573,7 +587,8 @@ export default {
 				{  name: '年化',type: 55 },
 				{ name: '降频',type: 54 },
 				{ name: '扩散指数',type: 56 },
-				{ name: '累计值',type: 'accumulate' }
+				{ name: '累计值',type: 'accumulate' },
+				{ name: '指数修匀',type:'alpha'}
 			],
 			batchTypes: [
 				{ name: '同比值',type: 32 },
@@ -583,7 +598,8 @@ export default {
 				{ name: 'N数值环差值',type: 44 },
 				{ name: '升频',type: 45 },
 				{ name: '累计值转月/季值',type: 'toMonthSeason' },
-				{ name: '累计值',type: 'accumulate' }
+				{ name: '累计值',type: 'accumulate' },
+				{ name: '指数修匀',type:'alpha'}
 			],
       isOnlyMe:false,//只看我的
 
@@ -1042,6 +1058,7 @@ export default {
 					//计算指标
 					this.setComputedDialogForm(res.Data,type);
 					this.computed_type =[47,48].includes(Source)?'joint': Source;
+					this.computed_type = [72,73].includes(Source)? 'alpha': Source;
 				}
 
 			})
@@ -1113,6 +1130,16 @@ export default {
 					moveVal: Source === 46 ? CalculateFormula : '',
 					calendar_type: Source === 49 ? Calendar : '',
 				}
+
+				if([72,73].includes(Source)){
+					this.operationForm = {
+						edb_id: EdbInfoId,
+						oldedb_id: CalculateList[0].FromEdbInfoId,
+						oldEdb_name: CalculateList[0].FromEdbName,
+						EdbName,Frequency,Unit,ClassifyId,Formula:CalculateFormula,
+						view: type === 'view'
+					}
+				}
 			}
 		},
 

+ 2 - 1
src/views/report_manage/reportEn/reportlist.vue

@@ -15,7 +15,8 @@
           <el-form-item label="">
             <el-button 
               v-permission="permissionBtn.enReportManageBtn.enReport_syncPolicy"
-              type="primary" 
+              type="primary"
+              size="medium"
               :loading="isPull" 
               @click="handlePullReport"
             >同步策略报告</el-button>

+ 1 - 1
src/views/report_manage/reportVariety.vue

@@ -63,7 +63,7 @@
                         </el-select>
                     </el-form-item>
                     <el-form-item label="后台排序">
-                        <el-input placeholder="后台排序" v-model="editBreedData.sort" type="number" style="width:400px"></el-input>
+                        <el-input placeholder="后台排序" min="0" v-model="editBreedData.sort" type="number" style="width:400px"></el-input>
                     </el-form-item>
                 </el-form>
                 <div style="text-align: center;margin-top:40px">

+ 7 - 1
src/views/semantics_manage/documentPage.vue

@@ -56,6 +56,11 @@
                     style="width: 14px; height: 14px; margin-right: 5px"
                     @click.stop="clickNodeHandle('edit', data)"
                   />
+                  <img
+                    :src="require('@/assets/img/data_m/move_ico.png')"
+                    alt="" v-if="node.level === 2"
+                    style="width: 14px; height: 14px; margin-right: 5px"
+                  />
                   <img
                     :src="require('@/assets/img/set_m/del.png')"
                     alt=""
@@ -383,7 +388,8 @@ export default {
                 nodeKeyId:`children_${moveParams.SaDocId}`},
                 {
                     level:2
-                })
+            })
+            this.$message.success('移动成功')
         })
     },
   },

+ 2 - 1
src/views/system_manage/enAuthManage.vue

@@ -336,12 +336,13 @@ export default {
       this.handleCheckedChange(selectList)
     },
     handleCheckedChange(val){
+      console.log(val);
       let checkedCount = val.length;
       this.checkAll = checkedCount === this.authOptions.length;
       this.isIndeterminate = checkedCount > 0 && checkedCount < this.authOptions.length;
     },
     handleCheckAllChange(val){
-      this.setAuthData.selectList = val ? this.authOptions : [];
+      this.setAuthData.selectList = val ? this.authOptions.map(item=>item.code) : [];
       this.isIndeterminate = false;
     },
     async saveChange(){