Kaynağa Gözat

Merge branch '1.2.4.1' into 1.2.4.1master

# Conflicts:
#	src/views/form/webDesign/dataController.vue
wu 3 hafta önce
ebeveyn
işleme
73f27c1483

+ 2 - 2
src/api/newbi/bigdata.js

@@ -29,7 +29,7 @@ export const categoryDel = (params) => {
 
 export const optionList = (params) => {
   return request({
-    url: api + '/visual/dynamicData/enumValueList',
+    url: '/bi-api/visual/dynamicData/enumValueList',
     method: 'get',
     params
   })
@@ -218,7 +218,7 @@ export const reportDetail = (params) => {
 
 export const enumCheck = (params) => {
   return request({
-    url: api + '/visual/dynamicData/checkTableUseEnum',
+    url: '/bi-api/visual/dynamicData/checkTableUseEnum',
     method: 'get',
     params
   })

+ 7 - 1
src/api/onlineDev/visualDev.js

@@ -824,7 +824,13 @@ export const getreminddatalogList = (params) => {
     params
   })
 }
-
+// 数据提醒状态修改
+export function enableStatusChanges(id,enableStatus) {
+  return request({
+    url: `/visual-api/paas/visualdev/reminddataconfig/enableConfig/${id}/${enableStatus}`,
+    method: 'GET'
+  })
+}
 export function getDataCintrollerlist(modelId) {
   return request({
     url: `/visual-api/paas/visualdev/index/list/${modelId}`,

+ 2 - 1
src/components/Dataset-filter/dataset-filter.vue

@@ -820,7 +820,8 @@ export default {
     // 判断是否展示枚举选项
     countEnumShow() {
       let func = this.nowCondition.conditions[0].function
-      return func === 'in' || func === 'notIn' || func === 'indexIn'
+      let useParamFlag = this.nowCondition.conditions[0].useParam || false
+      return (func === 'in' || func === 'notIn' || func === 'indexIn') && !useParamFlag
     },
     // 删除条件时
     onDelFilter(item, node, i) {

+ 17 - 4
src/components/Dataset-filter/tab-filter.vue

@@ -33,15 +33,21 @@
             </el-color-picker>
           </el-form-item>
           <div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
-            <el-button size="mini" type="primary" @click="addLabelGroup">{{ !nowFilter.id ? '新增标签组' : '更新标签组' }}</el-button>
             <el-button size="mini" @click="addLabelClick">添加标签</el-button>
+            <el-button size="mini" type="primary" @click="addLabelGroup">{{ !nowFilter.id ? '新增标签组' : '更新标签组' }}</el-button>
           </div>
           <el-table :data="newlabelList" border style="width: 100%">
             <el-table-column label="标签名称" prop="visualdevPermName">
             </el-table-column>
             <el-table-column label="是否启用">
               <template slot-scope="scope">
-                <el-switch @change="labelStatusChange($event, scope.row)" v-if="scope.row.visualdevPermName !== '全部' " :active-value="0" :inactive-value="1" v-model="scope.row.labelStatus">
+                <el-switch @change="labelStatusChange(scope.row)" v-if="scope.row.visualdevPermName !== '全部' " :active-value="0" :inactive-value="1" v-model="scope.row.labelStatus">
+                </el-switch>
+              </template>
+            </el-table-column>
+            <el-table-column label="默认展示">
+              <template slot-scope="scope">
+                <el-switch @change="labelStatusChange( scope.row)" v-if="scope.row.visualdevPermName !== '全部' " :active-value="1" :inactive-value="0" v-model="scope.row.defaultState">
                 </el-switch>
               </template>
             </el-table-column>
@@ -119,6 +125,7 @@ export default {
       addForm: {
         name:'',
         states:0,
+        defaultState:0,
         columnList:[],
         filter:[],
         filterRelation: '',
@@ -155,6 +162,7 @@ export default {
             labelJson: '',
             labelList:[],
             labelStatus: '',
+            defaultState: 0,
             visualdevId: this.modelId,
             defaultBgColor: '#ffffff',
             actionBgColor: '#1e90ff',
@@ -204,6 +212,7 @@ export default {
         this.addForm = {
           visualdevPermName:'',
           labelStatus:1,
+          defaultState:0,
           columnList:[],
           filter:[],
           filterRelation: '',
@@ -265,6 +274,7 @@ export default {
           let params = {
             visualdevPermName:this.addForm.name,
             labelStatus: this.addForm.states,
+            defaultState: this.addForm.defaultState,
             labelJson:JSON.stringify({filter:this.addForm.filter,filterRelationIntegration:this.addForm.filterRelationIntegration,filterRelation:this.addForm.filterRelation}),
             dataPermId:this.nowFilter.dataPermId,
             labelGroupId:this.nowFilter.id,
@@ -280,6 +290,7 @@ export default {
             this.addForm = {
               visualdevPermName:'',
               labelStatus:false,
+              defaultState:0,
               columnList:[],
               filter:[],
               filterRelation: '',
@@ -300,6 +311,7 @@ export default {
         this.addForm = {
           name:row.visualdevPermName,
           states:row.labelStatus,
+          defaultState:row.defaultState,
           filter:dataJson.filter,
           filterRelation: dataJson.filterRelation,
           id:row.id,
@@ -326,10 +338,11 @@ export default {
         this.getInfo()
       })
     },
-    labelStatusChange(val,row){
+    labelStatusChange(row){
       let params = {
         visualdevPermName:row.visualdevPermName,
-        labelStatus: val,
+        labelStatus: row.labelStatus,
+        defaultState: row.defaultState,
         labelJson:row.labelJson,
         dataPermId:row.dataPermId,
         labelGroupId:this.nowFilter.id,

+ 10 - 2
src/views/basic/dynamicModel/list/dataController.vue

@@ -27,9 +27,17 @@ export default {
     getStyle(item) {
       let styleJson = JSON.parse(this.config.styleJson);
       const flexBasis = `calc(${100 / this.config.showColumn}% - 10px)`;
+      let itemStyleJson = item.style ? JSON.parse(item.style) : null
       return {
-        'background-color': item.blockColor,
-        'color':item.fontColor,
+        borderWidth: itemStyleJson && itemStyleJson.shadowFlag ? itemStyleJson.borderWeight + 'px' : 'none',
+        borderStyle: itemStyleJson && itemStyleJson.shadowFlag ? itemStyleJson.borderStyle : 'none',
+        borderColor: itemStyleJson && itemStyleJson.shadowFlag ? itemStyleJson.borderColor : '',
+        boxShadow: itemStyleJson && itemStyleJson.shadowFlag ? `${itemStyleJson.shadowColor} ${itemStyleJson.borderVerticalOffset}px  ${itemStyleJson.borderSpreadRadius}px ${itemStyleJson.borderVerticalOffset}px` : 'none',
+        background: itemStyleJson ? itemStyleJson.backgroundType === 1 ? itemStyleJson.blockColor : itemStyleJson.backgroundType === 2 ? `linear-gradient(${itemStyleJson.linearBlockColorDeg}deg, ${itemStyleJson.linearBlockColorFrom}, ${itemStyleJson.linearBlockColorto})` : '' : '',
+        backgroundImage:itemStyleJson && itemStyleJson.backgroundType === 3 ? `url(${JSON.stringify(itemStyleJson.blockImg)})` : 'transparent',
+        'background-size': itemStyleJson && itemStyleJson.backgroundType === 3 ? 'cover' : 'cover',
+        'background-position': itemStyleJson && itemStyleJson.backgroundType === 3 ? 'center' : 'center',
+        'color':itemStyleJson && itemStyleJson.fontColor,
         'font-size': `${Number(styleJson.fontSize)}px`,
         'text-decoration': styleJson.textDecoration == 1 ? 'none' : 'underline',
         fontStyle: styleJson.fontStyle == 1 ? 'normal' : 'italic',

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

@@ -1479,7 +1479,7 @@ export default {
       this.toolbarConfig.print = this.columnData.printFlag === undefined ? true : this.columnData.printFlag;
       this.toolbarConfig.zoom = this.columnData.zoomFlag === undefined ? true : this.columnData.zoomFlag;
       this.toolbarConfig.custom = this.columnData.customFlag === undefined ? true : this.columnData.customFlag;
-      cubeFieldList({ cubeDataId: this.config.dbLinkId }).then((res) => {
+      cubeFieldList({cubeDataId: this.config.dbLinkId}).then((res) => {
         this.columnData.cubeList = res.data.data
       })
       this.oldScene = g.Copy({
@@ -1510,8 +1510,8 @@ export default {
         //请求权限 列表 直接看这一条 从搜索组件调用
         // this.initData()
       }
-      dataCintrollerConfigExecute(this.modelId).then((res)=>{
-        if (res.data.data){
+      dataCintrollerConfigExecute(this.modelId).then((res) => {
+        if (res.data.data) {
           this.dataControllerConfig = res.data.data.info
           this.dataControllerList = res.data.data.list
         }

+ 209 - 8
src/views/form/webDesign/dataController.vue

@@ -32,11 +32,92 @@
         <template slot-scope="scope">
           <el-button size="mini" @click="editTab(scope.row)">编辑</el-button>
           <el-button size="mini" @click="deleteTab(scope.row.id)">删除</el-button>
+          <el-button size="mini" @click="setTabCss(scope.row.id,scope.row.style)">设置样式</el-button>
         </template>
       </el-table-column>
     </el-table>
     <el-dialog :close-on-click-modal="false"
                :close-on-press-escape="false"
+               :title="'指标样式设置'"
+               :visible.sync="dataContCssConfigVis"
+               append-to-body
+               class="dataset-edit-computed-fields"
+               width="600px">
+      <el-form ref="form" :model="dataContCssForm" label-width="80px" style="height: 500px;overflow: hidden;overflow-y: auto;">
+        <el-form-item label="字体颜色">
+          <el-color-picker v-model="dataContCssForm.fontColor" show-alpha ></el-color-picker>
+        </el-form-item>
+        <el-form-item label="边框粗细">
+          <el-input v-model="dataContCssForm.borderWeight" style="width:200px" clearable placeholder="请输入" size="mini"></el-input>
+        </el-form-item>
+        <el-form-item label="边框样式">
+          <el-radio-group v-model="dataContCssForm.borderStyle">
+            <el-radio label="solid">实线</el-radio>
+            <el-radio label="dashed">虚线</el-radio>
+            <el-radio label="dotted">点线</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="边框颜色">
+          <el-color-picker v-model="dataContCssForm.borderColor" show-alpha ></el-color-picker>
+        </el-form-item>
+        <el-form-item label="背景类型">
+          <el-radio-group v-model="dataContCssForm.backgroundType">
+            <el-radio :label="1">纯色</el-radio>
+            <el-radio :label="2">渐变色</el-radio>
+            <el-radio :label="3">背景图片</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="区块颜色" v-if="dataContCssForm.backgroundType === 1">
+          <el-color-picker v-model="dataContCssForm.blockColor" show-alpha ></el-color-picker>
+        </el-form-item>
+        <el-form-item label="区块颜色" v-if="dataContCssForm.backgroundType === 2">
+          <div>
+            起始颜色:
+            <el-input v-model="dataContCssForm.linearBlockColorFrom" clearable placeholder="请输入" size="mini" style="width: 150px"></el-input>
+            <el-color-picker v-model="dataContCssForm.linearBlockColorFrom" show-alpha style="vertical-align: bottom;"></el-color-picker>
+          </div>
+          <div>
+            过渡颜色:
+            <el-input v-model="dataContCssForm.linearBlockColorto" clearable placeholder="请输入" size="mini" style="width: 150px"></el-input>
+            <el-color-picker v-model="dataContCssForm.linearBlockColorto" show-alpha style="vertical-align: bottom;"></el-color-picker>
+          </div>
+          <div>
+            渐变方向:
+            <el-slider :min="1" :max="365" v-model="dataContCssForm.linearBlockColorDeg" style="width:250px"></el-slider>
+          </div>
+          <div :style="dynamicStyle"></div>
+        </el-form-item>
+        <el-form-item label="背景图片" v-if="dataContCssForm.backgroundType === 3">
+          <el-upload
+            :action="define.comUploadUrl" :headers="uploadHeaders" :limit="1"
+            accept="image/*" :on-success="handleAvatarSuccess" list-type="picture-card"
+            :before-upload="beforeAvatarUpload" :file-list="fileList"
+            :on-remove="handleRemove">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="阴影边框">
+          <el-switch v-model="dataContCssForm.shadowFlag" >
+          </el-switch>
+        </el-form-item>
+        <el-form-item label="阴影颜色" v-if="dataContCssForm.shadowFlag">
+          <el-color-picker v-model="dataContCssForm.shadowColor" show-alpha ></el-color-picker>
+        </el-form-item>
+        <el-form-item label="阴影模糊" v-if="dataContCssForm.shadowFlag">
+          <el-input v-model="dataContCssForm.borderVerticalOffset" style="width:200px" clearable placeholder="请输入" size="mini"></el-input>
+        </el-form-item>
+        <el-form-item label="阴影偏移" v-if="dataContCssForm.shadowFlag">
+          <el-input v-model="dataContCssForm.borderSpreadRadius" style="width:200px" clearable placeholder="请输入" size="mini"></el-input>
+          <div :style="borderStyle"></div>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="dataContCssConfigVis = false">取消</el-button>
+          <el-button type="primary" @click="onCssFormSubmit">确认</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+    <el-dialog :close-on-click-modal="false"
+               :close-on-press-escape="false"
                :title="'样式设置'"
                :visible.sync="dataContConfigVis"
                append-to-body
@@ -110,7 +191,7 @@
     <el-dialog
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      :title="'新增指标'"
+      :title="addForm.id ? '编辑指标' :'新增指标'"
       :visible.sync="showEditComputedField"
       append-to-body
       class="dataset-edit-computed-fields"
@@ -125,10 +206,6 @@
           状态:
           <el-switch v-model="addForm.status" active-value="1" inactive-value="0">
           </el-switch>
-          设置区块颜色
-          <el-color-picker v-model="addForm.blockColor" show-alpha style="vertical-align: bottom;"></el-color-picker>
-          设置字体颜色
-          <el-color-picker v-model="addForm.fontColor" show-alpha style="vertical-align: bottom;"></el-color-picker>
         </div>
       </div>
       <div class="panels">
@@ -212,6 +289,7 @@ import {
   getDataCintrollerlist
 } from "@/api/onlineDev/visualDev";
 import {deepClone} from "@/utils";
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "dataController",
@@ -219,10 +297,12 @@ export default {
   props:['dbSourceId','activeName','cubeId','modelId'],
   data(){
     return {
+      uploadHeaders: { 'Blade-Auth': 'bearer ' + getToken() },
       tableName:'',
       tabData:[],
       showEditComputedField:false,
       dataContConfigVis:false,
+      dataContCssConfigVis:false,
       dbsoursTableLoading:false,
       columnsLoading:false,
       tableList:[],
@@ -267,7 +347,25 @@ export default {
         boxWidth:100,
         boxHeight:100,
         linHeight:1,
-      }
+      },
+      dataContCssForm:{
+        id:'',
+        fontColor:'',
+        backgroundType:1,
+        blockColor:'',
+        linearBlockColorFrom:'',
+        linearBlockColorto:'',
+        linearBlockColorDeg:100,
+        blockImg:'',
+        shadowFlag:false,
+        shadowColor:'',
+        borderWeight:1,
+        borderStyle:'solid',
+        borderColor:'',
+        borderSpreadRadius:'',
+        borderVerticalOffset:'',
+      },
+      fileList:[]
     }
   },
   watch: {
@@ -288,6 +386,27 @@ export default {
         return i.columnName.toUpperCase().includes(key) || i.columnTitle.includes(key)
       })
     },
+    dynamicStyle() {
+      return {
+        width: '100px',
+        height: '50px',
+        float: 'right',
+        marginTop:'-70px',
+        background:`linear-gradient(${this.dataContCssForm.linearBlockColorDeg}deg, ${this.dataContCssForm.linearBlockColorFrom}, ${this.dataContCssForm.linearBlockColorto})`
+      };
+    },
+    borderStyle(){
+      return {
+        width: '100px',
+        height: '50px',
+        float: 'right',
+        marginTop:'-70px',
+        borderWidth: this.dataContCssForm.borderWeight + 'px',
+        borderStyle: this.dataContCssForm.borderStyle,
+        borderColor: this.dataContCssForm.borderColor,
+        boxShadow: `${this.dataContCssForm.shadowColor} ${this.dataContCssForm.borderVerticalOffset}px  ${this.dataContCssForm.borderSpreadRadius}px ${this.dataContCssForm.borderVerticalOffset}px`
+      };
+    }
   },
   methods:{
     init(){
@@ -313,6 +432,25 @@ export default {
         }
       })
     },
+    handleAvatarSuccess(res, file) {
+      this.dataContCssForm.blockImg = res.msg
+      if (process.env.NODE_ENV === 'development') {
+        this.dataContCssForm.blockImg = this.define.comUrl + '/' + res.msg
+      } else {
+        this.dataContCssForm.blockImg = document.location.origin + '/' + res.msg
+      }
+      // this.imageUrl = URL.createObjectURL(file.raw);
+    },
+    handleRemove(){
+      this.dataContCssForm.blockImg = ''
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 < 2;
+      if (!isLt2M) {
+        this.$message.error('上传头像图片大小不能超过 2MB!');
+      }
+      return isLt2M;
+    },
     addFormClick(){
       this.showEditComputedField = true
       this.addForm = {
@@ -441,8 +579,6 @@ export default {
         status:this.addForm.status,
         visualdevId:this.modelId,
         indexConfigId:this.configForm.id,
-        fontColor:this.addForm.fontColor,
-        blockColor:this.addForm.blockColor,
       }
       dataCintrollerSave(params).then((res)=>{
         this.$message({
@@ -480,6 +616,71 @@ export default {
         })
       })
     },
+    setTabCss(id,style){
+      this.dataContCssConfigVis = true
+      if (style){
+        try {
+          this.dataContCssForm = JSON.parse(style)
+        }catch(e){
+          this.dataContCssForm = {
+            id:id,
+            fontColor:'',
+            backgroundType:1,
+            blockColor:'',
+            linearBlockColorFrom:'',
+            linearBlockColorto:'',
+            linearBlockColorDeg:100,
+            blockImg:'',
+            shadowFlag:false,
+            shadowColor:'',
+            borderWeight:1,
+            borderStyle:'solid',
+            borderColor:'',
+            borderSpreadRadius:'',
+            borderVerticalOffset:'',
+          }
+          this.fileList = []
+        }
+      }else {
+        this.dataContCssForm = {
+          id:id,
+          fontColor:'',
+          backgroundType:1,
+          blockColor:'',
+          linearBlockColorFrom:'',
+          linearBlockColorto:'',
+          linearBlockColorDeg:100,
+          blockImg:'',
+          shadowFlag:false,
+          shadowColor:'',
+          borderWeight:1,
+          borderStyle:'solid',
+          borderColor:'',
+          borderSpreadRadius:'',
+          borderVerticalOffset:'',
+        }
+        this.fileList = []
+      }
+    },
+    onCssFormSubmit(){
+      let params = {
+        id:this.dataContCssForm.id,
+        visualdevId:this.modelId,
+        indexConfigId:this.configForm.id,
+        style:JSON.stringify(this.dataContCssForm)
+      }
+      dataCintrollerSave(params).then((res)=>{
+        this.$message({
+          message: res.data.msg,
+          type: 'success',
+          duration: 1500,
+          onClose: () => {
+            this.dataContCssConfigVis = false
+            this.init()
+          }
+        })
+      })
+    },
     onSubmit(){
       let params = deepClone(this.configForm)
       params.styleJson = JSON.stringify(this.configFormCss)

+ 38 - 16
src/views/form/webDesign/dataReminder.vue

@@ -6,9 +6,9 @@
     </div>
     <el-table :data="tabData" border>
       <el-table-column prop="remindName" label="名称"></el-table-column>
-      <el-table-column prop="anchorColumn" label="瞄点字段">
+      <el-table-column prop="anchorColumnName" label="瞄点字段">
         <template slot-scope="scope">
-          {{columnList.find(o=>o.prop === scope.row.anchorColumn).label || scope.row.anchorColumn}}
+          {{columnList.find(o=>o.prop === scope.row.anchorColumnName).label || scope.row.anchorColumnName}}
         </template>
       </el-table-column>
       <el-table-column label="提醒时间">
@@ -29,10 +29,12 @@
       </el-table-column>
       <el-table-column label="状态">
         <template  slot-scope="scope">
-          {{scope.row.enableStatus == '1' ? '开启' : '关闭'}}
+          <el-switch @change="enableStatusChange($event,scope.row.id)" v-model="scope.row.enableStatus" active-text="开启" inactive-text="关闭" :active-value="1"
+                     :inactive-value="0">
+          </el-switch>
         </template>
       </el-table-column>
-      <el-table-column label="操作">
+      <el-table-column label="操作" width="210">
         <template slot-scope="scope">
           <el-button size="mini" @click="editTab(scope.row)">编辑</el-button>
           <el-button size="mini" @click="deleteTab(scope.row.id)">删除</el-button>
@@ -42,17 +44,17 @@
     </el-table>
     <div>
       <el-dialog title="运行日志" :visible.sync="detailVisible" append-to-body width="600px">
-        <el-table :data="tabData" border>
+        <el-table :data="reminddatalogList" border>
           <el-table-column prop="createTime" label="执行时间"></el-table-column>
           <el-table-column prop="dataConfigId" label="数据提醒ID"></el-table-column>
           <el-table-column label="执行结果">
             <template slot-scope="scope">
-              {{scope.row.execStatus == '1' ? '成功' : scope.row.execStatus == '2' ? '失败' : '未开始'}}
+              {{scope.row.execStatus == '0' ? '成功' : scope.row.execStatus == '1' ? '失败' : '未开始'}}
             </template>
           </el-table-column>
           <el-table-column label="执行日志">
             <template  slot-scope="scope">
-              <span v-if="scope.row.execLog.length < 40"> {{ scope.row.execLog }} </span>
+              <span v-if="scope.row.execLog?.length < 40"> {{ scope.row.execLog }} </span>
               <el-popover v-else placement="top-start" title="执行日志" width="600" trigger="click" :content="scope.row.execLog">
                 <div class="eventLog" slot="reference">{{ scope.row.execLog }}</div>
               </el-popover>
@@ -60,8 +62,8 @@
           </el-table-column>
           <el-table-column label="执行sql">
             <template  slot-scope="scope">
-              <span v-if="scope.row.execSql.length < 40"> {{ scope.row.execSql }} </span>
-              <el-popover v-else placement="top-start" title="执行sql" width="600" trigger="click" :content="scope.row.execLog">
+              <span v-if="scope.row.execSql?.length < 40"> {{ scope.row.execSql }} </span>
+              <el-popover v-else placement="top-start" title="执行sql" width="600" trigger="click" :content="scope.row.execSql">
                 <div class="eventLog" slot="reference">{{ scope.row.execSql }}</div>
               </el-popover>
             </template>
@@ -79,8 +81,8 @@
             <el-input v-model="addForm.remindName" placeholder="请输入提醒名称" style="width:200px"></el-input>
           </el-form-item>
           <el-form-item label="瞄点字段">
-            <el-select v-model="addForm.anchorColumn" filterable placeholder="请选择瞄点字段" clearable >
-              <el-option v-for="(item, index) in columnList.filter(o=> o.jnpfKey !== 'table')" :label="item.label" :value="item.prop" :key="item.prop"></el-option>
+            <el-select v-model="addForm.anchorColumn" filterable placeholder="请选择瞄点字段" clearable value-key="columnId">
+              <el-option v-for="(item, index) in columnList.filter(o=> o.jnpfKey !== 'table')" :label="item.label" :value="{ columnId: item.propId, columnName: item.prop }" :key="item.prop"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="提醒时间">
@@ -207,7 +209,7 @@ import {globalFunctions} from "@/utils/dict";
 import OrgSelect from "@/components/Process/OrgSelect/index.vue";
 import {getGlobalAndFormData} from "@/components/Dataset-filter/util";
 import iconBox from "@/components/JNPF-iconBox/index.vue";
-import {
+import { enableStatusChanges,
   getremindconfigdataList,
   getremindconfigdataRemove,
   getremindconfigdataSave,
@@ -239,7 +241,7 @@ export default {
       addForm:{
         id:'',
         remindName:'',//提醒名称
-        anchorColumn:'',//瞄点字段
+        anchorColumn:null,//瞄点字段
         remindType:0,//提醒时间 0之前 1之后
         remindTimes:'',
         remindFreq:'',
@@ -294,7 +296,7 @@ export default {
         this.addForm = {
           id:id,
           remindName:row.remindName,//提醒名称
-          anchorColumn:row.anchorColumn,//瞄点字段
+          anchorColumn:JSON.parse(row.anchorColumn) || null,//瞄点字段
           remindType:row.remindType,//提醒时间 0之前 1之后
           remindMinute:row.remindMinute,//提醒时间  分钟
           remindTimes:row.remindTimes,
@@ -317,7 +319,7 @@ export default {
         this.addForm = {
           id:'',
           remindName:'',//提醒名称
-          anchorColumn:'',//瞄点字段
+          anchorColumn:null,//瞄点字段
           remindType:0,//提醒时间 0之前 1之后
           remindMinute:'',//提醒时间  分钟
           remindTimes:'',
@@ -338,6 +340,18 @@ export default {
         }
       }
     },
+    enableStatusChange(enableStatus,id){
+      enableStatusChanges(id,enableStatus).then((res)=>{
+        this.$message({
+          message: res.data.msg,
+          type: 'success',
+          duration: 1500,
+          onClose: () => {
+            this.init()
+          }
+        })
+      })
+    },
     editTab(row){
       this.addFormClick(row.id,row)
     },
@@ -359,6 +373,7 @@ export default {
       this.logCurrentPage = 1
       this.logPageSize = 10
       this.dataConfigId = id
+      this.detailVisible = true
       this.getLogList()
     },
     getLogList(){
@@ -387,6 +402,7 @@ export default {
       let data = deepClone(this.addForm)
       data.visualdevId = this.modelId
       data.filterCondition = JSON.stringify(data.filterCondition)
+      data.anchorColumn = JSON.stringify(data.anchorColumn)
       data.statusIcon = JSON.stringify(data.statusIcon)
       data.remindUserIds = data.remindUserIds.length ? data.remindUserIds.join(',') : '';
       getremindconfigdataSave(data).then((res)=>{
@@ -396,7 +412,7 @@ export default {
           duration: 1500,
           onClose: () => {
             this.saveLading = false
-            this.dialogVisible = false
+            this.addFormVisible = false
             this.init()
           }
         })
@@ -421,4 +437,10 @@ export default {
     font-size: 18px;
   }
 }
+.eventLog {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  cursor: pointer;
+}
 </style>