|
|
@@ -456,6 +456,9 @@
|
|
|
: "--"
|
|
|
}}</span>
|
|
|
</div>
|
|
|
+<!-- <div v-else-if="scope.column.columnname == 'projectname'">-->
|
|
|
+<!-- <span>{{getFontHighlight(scope.column.data.projectname,scope.column.data.chars[0].projectname)}}</span>-->
|
|
|
+<!-- </div>-->
|
|
|
<div v-else-if="scope.column.columnname == 'address'">
|
|
|
<span>{{scope.column.data.address || scope.column.data.province?scope.column.data.province+scope.column.data.city+scope.column.data.county+scope.column.data.address:'--'}}</span>
|
|
|
</div>
|
|
|
@@ -959,6 +962,7 @@ export default {
|
|
|
this.repeats = res.data;
|
|
|
this.total = res.total;
|
|
|
this.$refs.form.validateField("projectname");
|
|
|
+ // this.getFontHighlight(res.data)
|
|
|
if (this.repeats.length > 0) {
|
|
|
this.siteid == "HY"
|
|
|
? (this.dialogTableVisible = true)
|
|
|
@@ -987,6 +991,37 @@ export default {
|
|
|
let res2 = await this.$store.dispatch("optiontypeselect", "projectgrade");
|
|
|
this.projectLead = res2.data;
|
|
|
},
|
|
|
+ getFontHighlight(data){
|
|
|
+ data.map(item =>{
|
|
|
+ console.log(item.chars[0].projectname,'item3333')
|
|
|
+ let newName = item.projectname.split('').map(newText => {
|
|
|
+ console.log(text,'text2222')
|
|
|
+ let projectnamenew = item.chars[0].projectname.join("") || ''
|
|
|
+ return projectnamenew.includes(newText) ? {
|
|
|
+ text,
|
|
|
+ color: "red"
|
|
|
+ }:{
|
|
|
+ text,
|
|
|
+ color:'#666'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(newName,'newName')
|
|
|
+ return newName
|
|
|
+ })
|
|
|
+ console.log(data,'重组数组')
|
|
|
+ return data
|
|
|
+ // let newName = data[0].charts.projectname.split('').map(text => {
|
|
|
+ // let projectname = set.join("") || ''
|
|
|
+ // return projectname.includes(text) ? {
|
|
|
+ // text,
|
|
|
+ // color: "red"
|
|
|
+ // }:{
|
|
|
+ // text,
|
|
|
+ // color:'#666'
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // return newName
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {},
|
|
|
created() {
|