|
|
@@ -23,7 +23,29 @@
|
|
|
<div v-else-if="scope.column.columnname === 'leader'">
|
|
|
<span>{{scope.column.data.leader?scope.column.data.leader.length !== 0 ? scope.column.data.leader[0].name:'--':'--'}}</span>
|
|
|
</div>
|
|
|
- <p v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
|
|
|
+ <div v-else-if="scope.column.columnname == 'projectname'">
|
|
|
+ <span v-for="item in scope.column.data.projectname" :key="item.index">
|
|
|
+ <span :style="{color:item.color}">{{item.text}}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <p v-else>
|
|
|
+ <span v-if="scope.column.data[scope.column.columnname]">
|
|
|
+ <span v-if="type == '客户'">
|
|
|
+ <span :style="{color:scope.column.data.chars[0][scope.column.columnname] && scope.column.data[scope.column.columnname].includes(scope.column.data.chars[0][scope.column.columnname])?'red':'#666'}">
|
|
|
+ {{scope.column.data[scope.column.columnname]}}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="type == '项目'">
|
|
|
+ <span :style="{color:scope.column.data.chars[scope.column.columnname] && scope.column.data[scope.column.columnname].includes(scope.column.data.chars[scope.column.columnname])?'red':'#666'}">
|
|
|
+ {{scope.column.data[scope.column.columnname]}}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span v-else>{{scope.column.data[scope.column.columnname]}}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ --
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
</template>
|
|
|
</tableLayout>
|
|
|
<div class="container normal-panel" style="text-align:right">
|
|
|
@@ -79,24 +101,34 @@ export default {
|
|
|
/*查询规则*/
|
|
|
async queryRule(){
|
|
|
if (this.type === '项目' || this.type === '客户'){
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": "20230410090502",
|
|
|
- "content": {},
|
|
|
- })
|
|
|
- if (this.type === '客户'){
|
|
|
- this.fields1 = res.data.custcheckrule.fields1
|
|
|
- this.fields2 = res.data.custcheckrule.fields2
|
|
|
- this.fields3 = res.data.custcheckrule.fields3
|
|
|
+ if (this.type == '项目' && !this.data.projectname){
|
|
|
+ this.$confirm('项目名称为空,不可进行恢复!', '提示', {
|
|
|
+ showCancelButton:false,
|
|
|
+ showClose:false,
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
}else {
|
|
|
- this.fields1 = res.data.projectcheckrule.fields1
|
|
|
- this.fields2 = res.data.projectcheckrule.fields2
|
|
|
- this.fields3 = res.data.projectcheckrule.fields3
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20230410090502",
|
|
|
+ "content": {},
|
|
|
+ })
|
|
|
+ if (this.type === '客户'){
|
|
|
+ this.fields1 = res.data.custcheckrule.fields1
|
|
|
+ this.fields2 = res.data.custcheckrule.fields2
|
|
|
+ this.fields3 = res.data.custcheckrule.fields3
|
|
|
+ }else {
|
|
|
+ this.fields1 = res.data.projectcheckrule.fields1
|
|
|
+ this.fields2 = res.data.projectcheckrule.fields2
|
|
|
+ this.fields3 = res.data.projectcheckrule.fields3
|
|
|
+ }
|
|
|
+ this.queryData()
|
|
|
}
|
|
|
- this.queryData()
|
|
|
}else {
|
|
|
this.onshow()
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
async queryData(){
|
|
|
console.log(this.fields1,'fields1')
|
|
|
@@ -119,16 +151,22 @@ export default {
|
|
|
this.param.id = 20221208184202
|
|
|
this.param.content.sa_projectid = this.data.sa_projectid
|
|
|
}
|
|
|
- const res = await this.$api.requested(this.param)
|
|
|
- this.list = res.data
|
|
|
- this.total = res.total
|
|
|
- this.currentPage = res.pageNumber
|
|
|
- console.log(res.data,'是否重复')
|
|
|
- if (res.data.length > 0){
|
|
|
- this.dialogTableVisible = true
|
|
|
- }else {
|
|
|
- this.onshow()
|
|
|
- }
|
|
|
+ this.$nextTick(async ()=>{
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
+ console.log(res.data,'是否重复')
|
|
|
+ if (res.data.length > 0){
|
|
|
+ if (this.type == '项目'){
|
|
|
+ this.tool.getCheckFontProject(res.data)
|
|
|
+ }
|
|
|
+ this.list = res.data
|
|
|
+ this.total = res.total
|
|
|
+ this.currentPage = res.pageNumber
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ }else {
|
|
|
+ this.onshow()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
onshow() {
|
|
|
this.$confirm(this.$t('数据恢复至原账号原位置,是否继续')+'?', this.$t('提示'), {
|