浏览代码

提交代买

朱鑫波 4 年之前
父节点
当前提交
be89f9a870

+ 49 - 10
src/views/modules/earlyWarningRules/configRules.vue

@@ -21,8 +21,8 @@
                         </div>
                         <div class="input-item"> 
                              <a-form-model-item ref="eventRuleLevel"  prop="eventRuleLevel">
-                                <a-radio-group v-model="form.mediaType" >
-                                    <!-- <a-radio-button :value="1" >头条</a-radio-button> -->
+                                <a-radio-group v-model="form.mediaType" :disabled="form.templateId!=null">
+                                    <a-radio-button :value="1" >头条</a-radio-button>
                                     <!-- <a-radio-button :value="2">快手</a-radio-button> -->
                                     <a-radio-button :value="3">头条内广</a-radio-button>
                                     <!-- <a-radio-button :value="4">快手内广</a-radio-button> -->
@@ -41,8 +41,8 @@
                              <a-form-model-item ref="templateName"  prop="templateName">
                                 <a-input
                                     v-model="form.templateName"
-                                    allowClear
-                                    :disabled="!!currentRuleId"
+                                    :allowClear='!currentRuleId'
+                                    @blur="blurTemplateName"
                                 />
                             </a-form-model-item>
                         </div>
@@ -80,15 +80,16 @@
                                             <div class="required-item"></div>
                                         </div>
                                         <div class="input-item"> 
+                                            <!-- :disabled="!!item.groupId" -->
                                             <a-form-model-item ref="groupName"  :prop="'ruleList.'+index+'.groupName'" :rules="[
                                                 { required: true, message: '请填写规则名称', trigger: 'blur' },
                                                 { min: 1, message: '长度不得小于1', trigger: 'blur' }]">                                               
                                                 <a-input
                                                     v-model="item.groupName"
                                                     placeholder="请输入规则名称"
-                                                    allowClear
+                                                    :allowClear="!item.groupId"
                                                     style="width:400px"
-                                                    :disabled="!!item.groupId"
+                                                    @blur="blurGroupName(item)"
                                                 />
                                             </a-form-model-item>    
                                         </div>
@@ -100,6 +101,7 @@
                                             <div class="required-item"></div>
                                         </div>
                                         <div class="input-item"> 
+                                            <!-- :disabled="!!item.groupId" -->
                                             <a-form-model-item ref="remark" :prop="'ruleList.'+index+'.remark'"  :rules="[
                                                 { required: true, message: '请填写规则描述', trigger: 'blur' },
                                                 { min: 1, message: '长度不得小于1', trigger: 'blur' },
@@ -109,7 +111,7 @@
                                                     style="width:400px"
                                                     placeholder="输入规则描述"
                                                     :auto-size="{ minRows: 2, maxRows: 5 }"
-                                                    :disabled="!!item.groupId"
+                                                    @blur="blurGroupName(item)"
                                                 />
                                             </a-form-model-item>   
                                         </div>
@@ -299,7 +301,7 @@
 
 <script>
 import moment from 'moment';
-import { getAction, postAction, downFile, downFilePost,deleteAction } from '@/api/manage';
+import { getAction, postAction, downFile, downFilePost,deleteAction,putAction } from '@/api/manage';
 import { Switch } from 'ant-design-vue';
 import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 
@@ -377,13 +379,50 @@ export default {
                 //     // { min: 2, message: '长度不得小于2', trigger: 'blur' },
                 // ],
             },
+            templateNameTrue:false,
+            templateNameOld:''
         }
     },
     watch: {
-        
+        'form.templateName':function(n,o){
+            console.log(n,o)
+            if(n!=o){
+                this.templateNameTrue = true
+            }else{
+                this.templateNameTrue = false
+            }
+        }
     },
     methods: {
-        
+        blurTemplateName(){
+            console.log(this.form)
+            if(this.templateNameTrue){
+                if(this.form.templateName!=''){
+                    putAction('/ruleTemplate/edit',{id:this.form.templateId,templateName:this.form.templateName}).then(res=>{
+                        if(res.success){
+
+                        }else{
+                           this.$message.error(res.message) 
+                        }
+                    })
+                }else{
+                    this.$message.error('模板名称不可以为空!!!')
+                }
+            }
+        },
+        blurGroupName(item){
+            if(item.groupName!=''&&item.remark!=''){
+                putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
+                    if(res.success){
+
+                    }else{
+                       this.$message.error(res.message)  
+                    }
+                })
+            }else{
+                this.$message.error('规则名称和规则描述不可以为空!!!')
+            }
+        },
         ruleTypeChange(item){
             
             if(item.ruleType=='base'){

+ 17 - 2
src/views/modules/earlyWarningRules/switchConfig.vue

@@ -65,6 +65,7 @@ export default {
   },
   data() {
     return {
+      ruleDetail:{},
       url: {
         onOrOffMonitoringLink: '/rule/switch/onOrOffMonitoringLink',
         onOrOffLandingPage: '/rule/switch/onOrOffLandingPage',
@@ -93,7 +94,7 @@ export default {
       postAction(
         this.url.onOrOffLandingPage,
         qs.stringify({
-          accountId: '1681047013755918',
+          accountId: this.ruleDetail.accountId,
           switchType: e.target.value,
         })
       ).then((res) => {
@@ -107,7 +108,7 @@ export default {
       postAction(
         this.url.onOrOffMonitoringLink,
         qs.stringify({
-          accountId: '1681047013755918',
+          accountId: this.ruleDetail.accountId,
           switchType: e.target.value,
         })
       ).then((res) => {
@@ -189,6 +190,20 @@ export default {
 
   mounted() {
     // console.log(this.$route.query);
+     var data = JSON.parse(localStorage.getItem('getRuleDetail'))
+     this.ruleDetail=data;
+     this.spinning=true;
+     postAction('/rule/switch/echoSwitchStatus',qs.stringify({
+       accountId:this.ruleDetail.accountId
+     })).then(res=>{
+       console.log(res);
+       this.spinning=false;
+       if(res.success){
+         
+         this.form.landingSwitch=res.result.landing_page?'off':'on';
+         this.form.monitoringLinkSwitch=res.result.monitoring_link?'off':'on';
+       }
+     })
   },
 }
 </script>

+ 19 - 19
src/views/modules/material/scriptFile.vue

@@ -7,7 +7,7 @@
   <a-card :bordered="false">
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
-      <!-- <a-form layout="inline">
+      <a-form layout="inline">
         <a-row :gutter="24">
           <a-col :md="6" :sm="8">
             <selectTable :projectId.sync="queryParam.projectId"></selectTable>
@@ -53,10 +53,10 @@
             </span>
           </a-col>
         </a-row>
-      </a-form> -->
+      </a-form>
     </div>
     <div style="float:right;margin:0 0 20px 20px">
-      <a-upload
+      <!-- <a-upload
         name="file"
         :multiple="false"
         :action="uploadAction"
@@ -70,8 +70,8 @@
           <a-icon type="upload" />
           {{loadingElse?'上传中,请稍后':'文件上传'}}
         </a-button>
-      </a-upload>
-      <!-- <a-dropdown placement="bottomRight">
+      </a-upload> -->
+      <a-dropdown placement="bottomRight">
         <a-button>新增</a-button>
         <a-menu slot="overlay">
           <a-menu-item>
@@ -87,7 +87,7 @@
             <span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
           </a-menu-item>
         </a-menu>
-      </a-dropdown> -->
+      </a-dropdown>
     </div>
     <div style="clear:both"></div>
     <div>
@@ -107,18 +107,18 @@
         <span slot="projectId_dictText" slot-scope="text">{{text?text:'-'}}</span>
         <span slot="action" slot-scope="text, record">
           <a @click="getViewUrlDbPath(record)">编辑</a>
-          <!-- <a-divider type="vertical" />
+          <a-divider type="vertical" />
           <a @click="bindProject(record)">项目绑定</a>
           <a-divider type="vertical" />
           <a @click="downLoad(record)">下载</a>
-          <a-divider type="vertical" /> -->
-          <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+          <a-divider type="vertical" /> 
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
-          </a-popconfirm> -->
+          </a-popconfirm>
         </span>
       </a-table>
     </div>
-    <!-- <div id="show"></div> -->
+    <div id="show"></div>
     <a-modal
       :maskClosable="false"
       :title="type=='add'?'脚本新建':'脚本编辑'"
@@ -220,14 +220,14 @@ export default {
             customRender: 'size',
           },
         },
-        // {
-        //   title: '绑定项目',
-        //   align: 'center',
-        //   dataIndex: 'projectId_dictText',
-        //   scopedSlots: {
-        //     customRender: 'projectId_dictText',
-        //   },
-        // },
+        {
+          title: '绑定项目',
+          align: 'center',
+          dataIndex: 'projectId_dictText',
+          scopedSlots: {
+            customRender: 'projectId_dictText',
+          },
+        },
         {
           title: '创建人',
           align: 'center',

文件差异内容过多而无法显示
+ 639 - 503
src/views/modules/onlineTraining/onlineTrainingList.vue


+ 2 - 2
vue.config.js

@@ -68,7 +68,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-         target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8888', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目