浏览代码

项目查重规则调整,业务数据大屏调整

qymljy 6 月之前
父节点
当前提交
7a32b1b502

+ 25 - 2
src/HManagement/serviceDataScreen/index.vue

@@ -233,11 +233,33 @@ export default {
       const res = await this.$api.requested(this.depmentParam)
       this.deplist = this.createMenu(res.data.dep)
       this.personnelList = res.data.hr
-      this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+      // this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
       this.depment = ''
       this.departmentid = ''
       const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
-      this.queryAllData(userid)
+      const hrid = JSON.parse(sessionStorage.getItem('active_account')).hrid
+      this.queryIsLeader(hrid,userid)
+      // this.queryAllData(hrid)
+    },
+    /*获取当前账号是否部门负责人*/
+    async queryIsLeader(hrid,userid){
+      let param = {
+        classname: "webmanage.hr.hr",
+        method: "query_hrMain",
+        content:{
+          hrid:hrid
+        }
+      }
+      const res = await this.$api.requested(param)
+      if (res.data.isleader == 1){
+        this.departmentid = this.deplist[0].departmentid
+        this.depment = this.deplist[0].departmentid
+        this.queryAllData(this.departmentid)
+      }else {
+        this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+        this.queryAllData(userid)
+      }
+      // console.log(res.data,'22222')
     },
     createMenu (array) {
       var that = this
@@ -310,6 +332,7 @@ export default {
       this.queryAllAgainData(val)
     },
     queryAllData(id){
+      console.log(id,'3333')
       /*业务员账户*/
       this.$refs.accountRef.param.content.dataid = id
       this.$refs.accountRef.param.content.type = this.departmentid !== ''?1:0

+ 31 - 18
src/HManagement/siteManage/securityConfig/index.vue

@@ -94,23 +94,34 @@
           <img width="72" height="72" src="../../../assets/icons/projectRule.svg" alt="">
           <div class="text-panel">
             <p class="explain-title">{{ $t('项目查重规则') }}</p>
-            <p class="explain-tips">{{ $t('当前设置:第一层') }}
-              <span v-for="(item,index) in projectRule.fields1">
-                <span v-if="index === projectRule.fields1.length -1">{{$t(item)}}</span>
-                <span v-else>{{item + ','}}</span>
-              </span>
-              ,{{ $t('第二层') }}
-              <span v-for="(item,index) in projectRule.fields2">
-                <span v-if="index === projectRule.fields2.length -1">{{$t(item)}}</span>
-                <span v-else>{{item + ','}}</span>
-              </span>
-              ,{{ $t('第三层') }}
-              <span v-for="(item,index) in projectRule.fields3">
-                <span v-if="index === projectRule.fields3.length -1">{{$t(item)}}</span>
-                <span v-else>{{item + ','}}</span>
-              </span>
-              ,{{ $t('保护期') }}:<span>{{projectprotectionperiod}}</span>
-            </p>
+            <div style="display: flex;justify-content: left">
+              <div class="explain-tips">{{$t(`当前设置:`)}}</div>
+              <div class="explain-tips">{{$t(`排除文字:`) }}</div>
+              <div class="explain-tips">
+                <span v-for="(item,index) in projectnameexcludefields">
+                  <span v-if="index === projectnameexcludefields.length -1">{{$t(item)}}</span>
+                  <span v-else>{{item + '、'}}</span>
+                </span>
+              </div>
+              <span class="explain-tips">,</span>
+              <div class="explain-tips">{{ $t('第一层') }}
+                <span v-for="(item,index) in projectRule.fields1">
+                  <span v-if="index === projectRule.fields1.length -1">{{$t(item)}}</span>
+                  <span v-else>{{item + ','}}</span>
+                </span>
+                ,{{ $t('第二层') }}
+                <span v-for="(item,index) in projectRule.fields2">
+                  <span v-if="index === projectRule.fields2.length -1">{{$t(item)}}</span>
+                  <span v-else>{{item + ','}}</span>
+                </span>
+                ,{{ $t('第三层') }}
+                <span v-for="(item,index) in projectRule.fields3">
+                  <span v-if="index === projectRule.fields3.length -1">{{$t(item)}}</span>
+                  <span v-else>{{item + ','}}</span>
+                </span>
+                ,{{ $t('保护期') }}:<span>{{projectprotectionperiod}}</span>
+              </div>
+            </div>
           </div>
         </div>
         <projectCheckRule v-if="tool.checkAuth($route.name,'projectCheckRule')"  @queryRule="queryRule"></projectCheckRule>
@@ -318,7 +329,8 @@ export default {
       quotedpricerecheck:'',
       project_tradefield:'',
       querysaledata:'',
-      queryhistoryproject:''
+      queryhistoryproject:'',
+      projectnameexcludefields:[]
     }
   },
   computed:{
@@ -412,6 +424,7 @@ export default {
       this.projectRule = res.data.projectcheckrule
       this.projectprotectionperiod = res.data.projectprotectionperiod
       this.projectReportRule = res.data.projectcheckfields
+      this.projectnameexcludefields = res.data.projectnameexcludefields
       console.log(res.data,'数据');
     }
   },

+ 40 - 3
src/HManagement/siteManage/securityConfig/modules/projectCheckRule.vue

@@ -6,6 +6,13 @@
         <el-col :span="24" style="margin-top: -20px">
           <span style="color: red">{{ $t('注意:每层的查重条件可多选字段') }}</span>
         </el-col>
+        <el-col :span="24" style="margin-top: 20px">
+          <div>
+            <span style="margin-right: 10px">{{$t(`项目名称查重排除文字`)}}:</span>
+            <el-tag v-for="item in projectnameexcludefields" :key="item.index" style="margin-right: 10px">{{item}}</el-tag>
+            <el-button type="primary" size="mini" @click="setWordVisible = true">{{$t(`添加`)}}</el-button>
+          </div>
+        </el-col>
         <el-col :span="24" style="margin-top: 20px">
           <div style="width: 50px" class="inline-16">
             {{ $t('第一层') }}:
@@ -126,6 +133,16 @@
         <el-button size="small" type="warning"  class="normal-btn-width btn-warning" @click="onSubmit">{{$t('确 定')}}</el-button>
       </div>
     </el-dialog>
+    <el-dialog :title="$t(`添加文字`)" append-to-body :visible.sync="setWordVisible" width="560px" :show-close="false">
+      <div style="margin: auto">
+        <span>{{$t(`排除文字`)}}:</span>
+        <el-input style="width: 450px" v-model="exclude" placeholder="请输入内容"></el-input>
+      </div>
+      <div class="dialog-footer">
+        <el-button size="small" @click="setWordVisible = false;exclude = ''" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary"  class="normal-btn-width" @click="onExclude">{{$t('确 定')}}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -135,6 +152,7 @@ export default {
   data(){
     return {
       dialogEditVisible:false,
+      setWordVisible:false,
       monthOption:[
         {
           value:'0',
@@ -207,7 +225,9 @@ export default {
           label: this.$t('或者')
         }
       ],
-      relation:''
+      relation:'',
+      exclude:'',
+      projectnameexcludefields:[],
     }
   },
   methods:{
@@ -244,7 +264,8 @@ export default {
             "fields3":this.fields3,
             "factor3": this.factor3
           },
-          "projectprotectionperiod":this.projectprotectionperiod
+          "projectprotectionperiod":this.projectprotectionperiod,
+          "projectnameexcludefields":this.projectnameexcludefields
         },
       })
       this.tool.showMessage(res,()=>{
@@ -264,6 +285,7 @@ export default {
     },
     /*查重规则*/
     async queryRule(){
+      this.projectnameexcludefields = []
       const res = await this.$api.requested({
         "id": "20230410090502",
         "content": {},
@@ -275,11 +297,26 @@ export default {
       this.factor2 = res.data.projectcheckrule.factor2
       this.factor3 = res.data.projectcheckrule.factor3
       this.projectprotectionperiod= res.data.projectprotectionperiod
+      this.projectnameexcludefields = res.data.projectnameexcludefields?res.data.projectnameexcludefields:[]
+    },
+    /*设置排除文字*/
+    onExclude(){
+      console.log(this.projectnameexcludefields,'fields')
+      console.log(this.projectnameexcludefields.length)
+      console.log(this.exclude,'exclude')
+      this.projectnameexcludefields.push(this.exclude)
+      this.setWordVisible = false
+      this.exclude = ''
     }
   }
 }
 </script>
 
 <style scoped>
-
+/deep/ .el-message-box--center .el-message-box__title {
+  position: relative;
+  display: flex;
+  align-items: normal;
+  justify-content: left !important;
+}
 </style>