叶松
2023-12-01 5efd01db698683e95a63053da43aaa08fa35a185
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!-- 设备管理 ==> 拌合站屏管理-->
<template>
  <div class="main">
    <div class="main_header">
      <div class="header_item">
        <span class="header_label">拌合站屏:</span>
        <el-select size="mini" v-model="queryInfo.screen" placeholder="请选择拌合站屏">
          <el-option v-for="item in queryInfoScreens" :key="item.value" :label="item.label"
            :value="item.value"></el-option>
        </el-select>
      </div>
      <div class="header_item">
        <span class="header_label">录入方式:</span>
        <el-select size="mini" v-model="queryInfo.inmode" placeholder="请选择录入方式">
          <el-option v-for="item in queryInfoInmodes" :key="item.value" :label="item.label"
            :value="item.value"></el-option>
        </el-select>
      </div>
      <div class="header_item">
        <span class="header_label">创建时间:</span>
        <el-date-picker type="daterange" v-model="times" value-format="yyyy-MM-dd" start-placeholder="起始时间"
          end-placeholder="结束时间" @change="changeTime" clear></el-date-picker>
      </div>
      <div class="header_item">
        <el-button icon="el-icon-search" v-permission="'search'" @click="queryReset">查询</el-button>
        <el-button icon="el-icon-plus" v-permission="'insert'" @click="addRow">新增</el-button>
      </div>
    </div>
    <div class="main_content">
      <div class="main_content_item" v-for="(item, index) in ['', '', '', '', '',]" :key="index">
 
      </div>
    </div>
 
    <!-- 详情dialog -->
    <el-dialog width="400px" class="prop_dialog" v-if="isRenderDialog" title="详情" :visible.sync="asyncVisible">
 
      <el-form class="rule_form" label-width="auto">
 
        <div class="divider"></div>
 
        <el-form-item label="巡检任务:">{{ info.task }}</el-form-item>
 
        <el-form-item label="巡检标准:">{{ info.standard }}</el-form-item>
 
        <el-form-item label="巡检人员:">{{ info.name }}</el-form-item>
 
        <div class="divider"><span>巡检路线</span></div>
 
        <div class="regions">
          <div class="region" v-for="     item      in      info.regions     " :key="item.regionId">{{
            item.region }}
          </div>
        </div>
      </el-form>
    </el-dialog>
 
  </div>
</template>
<script>
export default {
  data() {
    return {
      loading: false,
      isRenderDialog: false,
      asyncVisible: false,
 
      info: { // 详情信息
        task: '',
        standard: '',
        name: '',
        regions: [],
      },
      userId: '', // 存储点击后的用户id
      taskId: '', // 存储点击后的巡检任务id
      times: [], // 时间范围
      queryInfo: {
        pageNum: 1,
        pageSize: 10,
        inmode: '', // 录入方式
        screen: '', // 拌合站屏
        startTime: '',
        endTime: '',
      },
      regionInfos: { // 巡检路线详情
        isRenderDialog: false,
        asyncVisible: false,
        time: '', // 巡检时间
        region: '', // 巡检区域
        res: '', // 巡检结果
        img: '', // 上传的图片
        location: '', // 位置
      }
    }
  },
  beforeCreate() {
    this.queryInfoInmodes = [
      {value: '0', label: '手动'},
      {value: '1', label: '自动'},
    ]
    this.queryInfoScreens = [
      {value: '0', label: '1-1'},
      {value: '1', label: '1-2'},
    ]
    this.$http = this.$api.Safety.RiskGrad.polling
  },
  created() {
    this.setTableColumn()
    this.getLists()
  },
  methods: {
    // 获取table列表数据
    getLists() {
      let params = this.queryInfo
      this.loading = true
      this.$http.taskcardGetlists(params).then(res => {
        if (res.statusMsg === 'ok') {
          console.log(res)
        }
        this.loading = false
      })
    },
    // 初始化 table 配置
    setTableColumn() {
    },
    addRow() { },
    // 查询按钮列表信息
    queryReset() {
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.getLists()
    },
    changeTime(times) {
      times = times || ['', '']
      this.queryInfo.startTime = times[0]
      this.queryInfo.endTime = times[1]
    },
  }
}
</script>
 
<style lang="scss" scoped>
@import '@/style/layout-main.scss';
 
.rule_form {
  color: #fff;
 
  ::v-deep .el-form-item__content {
    display: block;
  }
 
  .image {
    flex: none;
    width: 91px;
    height: 120px;
    margin-right: 15px;
    border-radius: 5px;
    border: 1px solid #0c5983;
 
    img {
      width: 100%;
    }
  }
}
 
.regions {
  text-align: center;
 
  .region {
    line-height: 34px;
    margin-bottom: 16px;
    background: rgba(56, 175, 247, .25);
    cursor: pointer;
  }
}
 
.divider {
  position: relative;
  margin-bottom: 30px;
  text-indent: 10px;
  color: #fff;
  border-left: 3px solid #18F6F8;
 
  &::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid #0C4D6F;
  }
}
 
.main_content .main_content_item {
  float: left;
  width: 48%;
  height: 200px;
  margin: 1%;
  border: 1px solid red;
}
</style>