|
@@ -5,6 +5,7 @@
|
5
|
5
|
app.controller("inspectReportCtrl", [
|
6
|
6
|
"$rootScope",
|
7
|
7
|
"$scope",
|
|
8
|
+ "$sce",
|
8
|
9
|
"$state",
|
9
|
10
|
"$timeout",
|
10
|
11
|
"$interval",
|
|
@@ -23,6 +24,7 @@ app.controller("inspectReportCtrl", [
|
23
|
24
|
function (
|
24
|
25
|
$rootScope,
|
25
|
26
|
$scope,
|
|
27
|
+ $sce,
|
26
|
28
|
$state,
|
27
|
29
|
$timeout,
|
28
|
30
|
$interval,
|
|
@@ -230,7 +232,7 @@ app.controller("inspectReportCtrl", [
|
230
|
232
|
width: "18%",
|
231
|
233
|
enableFiltering: false,
|
232
|
234
|
cellTemplate:
|
233
|
|
- '<div class="ui-grid-cell-contents" style="display:flex;flex-wrap:wrap;"><img class="xj_img" ng-click="grid.appScope.seePic(row.entity,imageurl)" ng-repeat="(index,imageurl) in row.entity.filePath" ng-src="{{imageurl}}"/></div>',
|
|
235
|
+ '<div class="ui-grid-cell-contents" style="display:inline;"><div ng-if="row.entity.filePath[true]">线上 <img class="xj_img" ng-click="grid.appScope.seePic(row.entity,imageurl)" ng-repeat="(index,imageurl) in row.entity.filePath[true]" ng-src="{{imageurl}}"/></div><div ng-if="row.entity.filePath[false]">线下 <img class="xj_img" ng-click="grid.appScope.seePic(row.entity,imageurl)" ng-repeat="(index,imageurl) in row.entity.filePath[false]" ng-src="{{imageurl}}"/></div></div>',
|
234
|
236
|
},
|
235
|
237
|
// {
|
236
|
238
|
// name: "pic1",
|
|
@@ -241,18 +243,20 @@ app.controller("inspectReportCtrl", [
|
241
|
243
|
// '<div class="ui-grid-cell-contents"><img class="xj_img" ng-click="grid.appScope.seePic(row.entity,index)" ng-repeat="(item,index) in [1,2,3]" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp2.itc.cn%2Fq_70%2Fimages03%2F20201101%2F75417504ddc843d78610d1cb8dd9c402.jpeg&refer=http%3A%2F%2Fp2.itc.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1649583898&t=1ead2b8808f10e3da9d6864543d90bce"/></div>',
|
242
|
244
|
// },
|
243
|
245
|
{
|
244
|
|
- name: "model.descriptionTextarea",
|
|
246
|
+ name: "descriptionTextarea",
|
245
|
247
|
displayName: "整改意见",
|
246
|
248
|
width: "18%",
|
247
|
249
|
enableFiltering: false,
|
248
|
250
|
cellTemplate:
|
249
|
|
- '<div class="ui-grid-cell-contents"><div class="inspectPar"><p>{{row.entity.model.descriptionTextarea}}</p></div></div>',
|
|
251
|
+ '<div class="ui-grid-cell-contents"><div class="inspectPar"><p ng-bind-html="row.entity.descriptionTextarea"></p></div></div>',
|
250
|
252
|
},
|
251
|
253
|
{
|
252
|
254
|
name: "userName",
|
253
|
255
|
displayName: "巡检人",
|
254
|
256
|
width: "12%",
|
255
|
|
- enableFiltering: false
|
|
257
|
+ enableFiltering: false,
|
|
258
|
+ cellTemplate:
|
|
259
|
+ '<div class="ui-grid-cell-contents"><div class="inspectPar"><p ng-bind-html="row.entity.userName"></p></div></div>',
|
256
|
260
|
},
|
257
|
261
|
{
|
258
|
262
|
name: "address",
|
|
@@ -424,20 +428,39 @@ app.controller("inspectReportCtrl", [
|
424
|
428
|
i + 1 + filterData.idx * filterData.sum;
|
425
|
429
|
}
|
426
|
430
|
for (var i = 0; i < $scope.myData.length; i++) {
|
|
431
|
+ var descriptionTextareaStr = '';
|
|
432
|
+ // 处理整改意见
|
|
433
|
+ if($scope.myData[i].descriptionTextarea){
|
|
434
|
+ for(var key in $scope.myData[i].descriptionTextarea){
|
|
435
|
+ descriptionTextareaStr += $scope.myData[i].descriptionTextarea[key] + '<br>';
|
|
436
|
+ }
|
|
437
|
+ $scope.myData[i].descriptionTextarea = $sce.trustAsHtml(descriptionTextareaStr);
|
|
438
|
+ }
|
427
|
439
|
// 处理巡检人
|
428
|
440
|
$scope.myData[i].userName = $scope.myData[i].userName || [];
|
429
|
|
- $scope.myData[i].userName = $scope.myData[i].userName.join(';');
|
|
441
|
+ var userNameStr = ''
|
|
442
|
+ $scope.myData[i].userName.forEach((v, i)=>{
|
|
443
|
+ userNameStr += v + '<br>';
|
|
444
|
+ })
|
|
445
|
+ $scope.myData[i].userName = $sce.trustAsHtml(userNameStr);
|
430
|
446
|
// 处理日期
|
431
|
447
|
$scope.myData[i].startTime = new Date($scope.myData[i].startTime);
|
432
|
448
|
// 处理图片
|
433
|
|
- if ($scope.myData[i].filePath) {
|
434
|
|
- $scope.myData[i].filePath = $scope.myData[i].filePath
|
435
|
|
- .split(",")
|
436
|
|
- .map((v) => imgBaseUrl + "/file" + v);
|
437
|
|
- } else {
|
438
|
|
- $scope.myData[i].filePath = [];
|
|
449
|
+ // if ($scope.myData[i].filePath) {
|
|
450
|
+ // $scope.myData[i].filePath = $scope.myData[i].filePath
|
|
451
|
+ // .split(",")
|
|
452
|
+ // .map((v) => imgBaseUrl + "/file" + v);
|
|
453
|
+ // } else {
|
|
454
|
+ // $scope.myData[i].filePath = [];
|
|
455
|
+ // }
|
|
456
|
+ // ----------------
|
|
457
|
+ var descriptionTextareaStr = '';
|
|
458
|
+ if($scope.myData[i].filePath){
|
|
459
|
+ for(var key in $scope.myData[i].filePath){
|
|
460
|
+ $scope.myData[i].filePath[key] = $scope.myData[i].filePath[key].split(",").map((v) => imgBaseUrl + "/file" + v);
|
|
461
|
+ }
|
439
|
462
|
}
|
440
|
|
- //巡检项cnm
|
|
463
|
+ //巡检项
|
441
|
464
|
$scope.myData[i].xj_items = $scope.myData[i].fields
|
442
|
465
|
.filter((v) => {
|
443
|
466
|
v.key = (v.key || "").toString();
|