|
@@ -17,6 +17,9 @@
|
|
|
:maxTagCount='1'
|
|
|
allowClear
|
|
|
@change="accountChange"
|
|
|
+ show-search
|
|
|
+ option-filter-prop="children"
|
|
|
+ :filter-option="filterOption"
|
|
|
>
|
|
|
<a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
|
|
|
{{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
|
|
@@ -24,11 +27,7 @@
|
|
|
</a-select>
|
|
|
</span>
|
|
|
<span class="OptinItem">
|
|
|
- <!-- <a-select style="width: 280px" v-model="directionalId" @change="directionalIdChange" placeholder="选择策略以及定向包">
|
|
|
- <a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
|
|
|
- {{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
|
|
|
- </a-select-option>
|
|
|
- </a-select> -->
|
|
|
+
|
|
|
<a-tree-select
|
|
|
v-if="tabKey==1"
|
|
|
v-model="directionalId"
|
|
@@ -842,6 +841,11 @@ const publicColumns = [
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ filterOption(input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
// //项目改变后的事件
|
|
|
treeChange(val) {
|
|
|
// console.log(this.treeData)
|
|
@@ -929,12 +933,7 @@ const publicColumns = [
|
|
|
|
|
|
|
|
|
},
|
|
|
- filterOption(input, option){
|
|
|
- console.log(input, option)
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- );
|
|
|
- },
|
|
|
+
|
|
|
//请求项目和账户内容
|
|
|
accountHttp(){
|
|
|
this.treeData=[];
|
|
@@ -1452,10 +1451,12 @@ const publicColumns = [
|
|
|
},
|
|
|
|
|
|
getEchartData(){
|
|
|
- this.spinning=true;
|
|
|
- this.loading=true
|
|
|
+
|
|
|
let params=this.handlerParams();
|
|
|
params.dataType=this.value
|
|
|
+ if(params.accountId&&(params.targetIds||params.codes)){
|
|
|
+ this.spinning=true;
|
|
|
+ this.loading=true
|
|
|
postAction('/ai/analyze/chart/targetOrMaterial',params).then(res=>{
|
|
|
console.log(res)
|
|
|
this.spinning=false;
|
|
@@ -1489,7 +1490,7 @@ const publicColumns = [
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
|
|
@@ -1731,7 +1732,7 @@ const publicColumns = [
|
|
|
search(){
|
|
|
|
|
|
this.getRelativeData()
|
|
|
- // this.getDetailTableData()
|
|
|
+
|
|
|
this.getEchartData()
|
|
|
},
|
|
|
|
|
@@ -1811,62 +1812,15 @@ const publicColumns = [
|
|
|
if(userInfo){
|
|
|
this.userId=JSON.parse(userInfo).value.id
|
|
|
}
|
|
|
- new Promise((resolve,reject)=>{
|
|
|
- getAction('/ctop/userAllocation/getAccountIdsByUserId',{
|
|
|
- userId:this.userId,
|
|
|
- }).then(res=>{
|
|
|
- console.log(res)
|
|
|
- if(res.success){
|
|
|
- this.accountList=res.result
|
|
|
- this.accountIds=res.result[0].account_id;
|
|
|
-
|
|
|
- this.treeData=[];
|
|
|
- this.directionalId=[];
|
|
|
- getAction('/ai/analyze/getStrategyAndTarget', {
|
|
|
- accountId:this.accountIds
|
|
|
- }).then(res => {
|
|
|
- if(res.success){
|
|
|
- // console.log(res);
|
|
|
- if(res.result){
|
|
|
- res.result.forEach((element,index) => {
|
|
|
- if(element){
|
|
|
- this.treeData.push({});
|
|
|
- this.treeData[index].title=element.strategy_name +'_('+ element.id +')';
|
|
|
- this.treeData[index].value='strategy'+element.id;
|
|
|
- this.treeData[index].key=element.id;
|
|
|
-
|
|
|
- this.treeData[index].children=[];
|
|
|
-
|
|
|
- if(element.targets.length&&element.targets[0]){
|
|
|
- element.targets.forEach((ele,i)=>{
|
|
|
- this.treeData[index].children.push({});
|
|
|
- this.treeData[index].children[i].title=ele.target_type+'_'+ele.target_content
|
|
|
- this.treeData[index].children[i].value=element.id+'_'+ele.id;
|
|
|
- this.treeData[index].children[i].key=element.id+'_'+ele.id;
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- // console.log(this.treeData)
|
|
|
- this.directionalId=[this.treeData[0].children[0].value]
|
|
|
- resolve()
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- }else{
|
|
|
- this.$message.error('账户信息获取错误!')
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
+ getAction('/ctop/userAllocation/getAccountIdsByUserId',{
|
|
|
+ userId:this.userId,
|
|
|
}).then(res=>{
|
|
|
- this.search()
|
|
|
-
|
|
|
+ console.log(res)
|
|
|
+ if(res.success){
|
|
|
+ this.accountList=res.result
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
filters: {
|
|
|
toPercentage(val) {
|