rev:现场代码优化
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
<span v-if="scope.row.instruction_status=='0' ">就绪</span>
|
||||
<span v-if="scope.row.instruction_status=='1' ">执行中</span>
|
||||
<span v-if="scope.row.instruction_status=='2' ">完成</span>
|
||||
<span v-if="scope.row.instruction_status=='3' ">取消</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_code" label="起点" />
|
||||
|
||||
@@ -66,10 +66,31 @@
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<Search />
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
align="right"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-thumb"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -237,6 +258,7 @@
|
||||
<span v-if="scope.row.task_status=='0' ">就绪</span>
|
||||
<span v-if="scope.row.task_status=='1' ">执行中</span>
|
||||
<span v-if="scope.row.task_status=='2' ">完成</span>
|
||||
<span v-if="scope.row.task_status=='3' ">取消</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" label="任务优先级" />
|
||||
@@ -259,10 +281,13 @@ import Search from '@/views/monitor/lucene/time'
|
||||
import crudTask from '@/api/acs/task/task'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
import routeCurd from '@/api/acs/route/routePlan'
|
||||
import { getDicts } from '@/api/system/dict'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = {
|
||||
task_id: null,
|
||||
@@ -286,7 +311,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Task',
|
||||
components: { pagination, crudOperation, Search },
|
||||
components: { pagination, crudOperation, rrOperation, Search },
|
||||
dicts: ['task_status'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -356,6 +381,7 @@ export default {
|
||||
toZList: [],
|
||||
start_flag: false,
|
||||
end_flag: false,
|
||||
showDtlLoading: false,
|
||||
permission: {
|
||||
add: ['admin', 'task:add'],
|
||||
edit: ['admin', 'task:edit'],
|
||||
@@ -538,6 +564,29 @@ export default {
|
||||
this.form.to_y = ''
|
||||
this.form.to_z = ''
|
||||
}
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
const data = {
|
||||
'task_code': this.crud.query.task_code,
|
||||
'vehicle_code': this.crud.query.vehicle_code,
|
||||
'material_type': this.crud.query.material_type,
|
||||
'status': this.crud.query.status,
|
||||
'point_code': this.crud.query.point_code,
|
||||
'createTime': this.crud.query.createTime[0],
|
||||
'end_time': this.crud.query.createTime[1]
|
||||
}
|
||||
this.showDtlLoading = true
|
||||
download('/api/task/download', data).then(result => {
|
||||
downloadFile(result, '任务详情', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
<span v-if="scope.row.task_status=='0' ">就绪</span>
|
||||
<span v-if="scope.row.task_status=='1' ">执行中</span>
|
||||
<span v-if="scope.row.task_status=='2' ">完成</span>
|
||||
<span v-if="scope.row.task_status=='3' ">取消</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" label="任务优先级" />
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<span v-if="scope.row.instruction_status=='0' ">就绪</span>
|
||||
<span v-if="scope.row.instruction_status=='1' ">执行中</span>
|
||||
<span v-if="scope.row.instruction_status=='2' ">完成</span>
|
||||
<span v-if="scope.row.instruction_status=='3' ">取消</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="send_status" label="下发状态">
|
||||
|
||||
@@ -338,6 +338,7 @@
|
||||
<span v-if="scope.row.task_status==='0' ">就绪</span>
|
||||
<span v-if="scope.row.task_status==='1' ">执行中</span>
|
||||
<span v-if="scope.row.task_status==='2' ">完成</span>
|
||||
<span v-if="scope.row.task_status==='3' ">取消</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" label="优先级" width="100" />
|
||||
|
||||
Reference in New Issue
Block a user