综合修改1(未完成)
This commit is contained in:
parent
092f606bb7
commit
79f973d8f7
@ -4,8 +4,8 @@ ENV = 'moblie'
|
||||
VITE_APP_ROUTER_PREFIX = './'
|
||||
|
||||
# 路由前缀
|
||||
VITE_APP_BASE_API = "http://192.168.50.163:7000/"
|
||||
|
||||
VITE_APP_BASE_API = "https://192.168.50.163"
|
||||
# VITE_APP_BASE_API = "http://192.168.0.49:7000/"
|
||||
# 默认上传地址
|
||||
VITE_APP_UPLOAD_URL = '/Common/UploadFile'
|
||||
|
||||
|
||||
@ -148,4 +148,16 @@ export function updateTaskStatus(params) {
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置任务开始时间
|
||||
* @param {id,status}
|
||||
*/
|
||||
export function setTaskStartTime(params) {
|
||||
return request({
|
||||
url: 'mes/deviceManagement/DeviceTaskExecute/set_task_start_time',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
@ -37,7 +37,7 @@
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('responsePerson')" />
|
||||
<el-table-column prop="endTime" label="签到时间" :show-overflow-tooltip="true" v-if="columns.showColumn('endTime')"> </el-table-column>
|
||||
<el-table-column prop="duration" label="持续时长(小时)" align="center" v-if="columns.showColumn('duration')" />
|
||||
<el-table-column prop="duration" label="持续时长(分钟)" align="center" v-if="columns.showColumn('duration')" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -4,16 +4,16 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="10" :xs="6">
|
||||
<el-form-item label="设备所属">
|
||||
<el-input type="input" v-model="deviceItem.workshop" disabled />
|
||||
<el-input type="input" v-model="deviceItem.workshop" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备产线">
|
||||
<el-input type="input" v-model="deviceItem.workline" disabled />
|
||||
<el-input type="input" v-model="deviceItem.workline" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input type="input" v-model="deviceItem.deviceName" disabled />
|
||||
<el-input type="input" v-model="deviceItem.deviceName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号">
|
||||
<el-input type="input" v-model="deviceItem.deviceCode" disabled />
|
||||
<el-input type="input" v-model="deviceItem.deviceCode" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="14" :xs="6">
|
||||
@ -138,7 +138,6 @@
|
||||
})
|
||||
const { proxy } = getCurrentInstance()
|
||||
watch(() => props.deviceItem, (newValue, oldValue) => {
|
||||
console.log('props.deviceItem watch', newValue)
|
||||
if (newValue != null) {
|
||||
init();
|
||||
getStepsData();
|
||||
@ -164,6 +163,7 @@
|
||||
.then(async () => {
|
||||
const data = {
|
||||
id: props.executeKey,
|
||||
|
||||
status: 2
|
||||
}
|
||||
updateTaskStatus(data).then(res => {
|
||||
@ -323,13 +323,12 @@
|
||||
const IsIdentification = ref(false);
|
||||
|
||||
function handlerIdentification() {
|
||||
console.log(navigator.mediaDevices);
|
||||
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
||||
// 浏览器支持getUserMedia
|
||||
IdentificationShow.value = true;
|
||||
} else {
|
||||
// 浏览器不支持getUserMedia
|
||||
proxy.$message.error('当前浏览器不支持打开摄像头!请更换浏览器!');
|
||||
proxy.$message.error('当前浏览器不支持打开摄像头!请更换浏览器或设置摄像头权限!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="18">
|
||||
<el-steps direction="horizontal" :active="deviceStepsActive" finish-status="success">
|
||||
<el-step v-for="(item,index) in deviceStepsList" :title="`设备${index + 1}`" :key="index" />
|
||||
<el-step v-for="(item,index) in deviceStepsList" :title="item.deviceName" :key="index" />
|
||||
</el-steps>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -50,9 +50,9 @@
|
||||
function getDeviceStepsData() {
|
||||
AchieveTaskbindDevice(executeKey.value).then(res => {
|
||||
const { code, data } = res;
|
||||
console.log(1, 'getDeviceStepsData', data);
|
||||
// console.log(1, 'getDeviceStepsData', data);
|
||||
if (code === 200) {
|
||||
console.log(2, data);
|
||||
// console.log(2, data);
|
||||
deviceStepsList.value = data;
|
||||
}
|
||||
})
|
||||
|
||||
@ -57,15 +57,16 @@
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="id" label="数据库编号" align="center" v-if="columns.showColumn('id')" />
|
||||
<el-table-column prop="taskId" label="任务编号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('taskId')" />
|
||||
<el-table-column prop="taskName" label="任务名称" align="center" width="200" :show-overflow-tooltip="true" v-if="columns.showColumn('taskName')" />
|
||||
<el-table-column prop="taskName" label="任务名称" align="center" min-width="120" :show-overflow-tooltip="true" v-if="columns.showColumn('taskName')" />
|
||||
<el-table-column prop="persion" label="执行人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('persion')" />
|
||||
<el-table-column prop="type" label="任务类型" align="center" v-if="columns.showColumn('type')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="options.typeOptions" :value="scope.row.type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="distributedTime" label="任务派发时间" :show-overflow-tooltip="true" v-if="columns.showColumn('distributedTime')" />
|
||||
<el-table-column prop="startTime" label="任务开始时间" :show-overflow-tooltip="true" v-if="columns.showColumn('startTime')" />
|
||||
<el-table-column prop="endTime" label="任务结束时间" :show-overflow-tooltip="true" v-if="columns.showColumn('endTime')" />
|
||||
<el-table-column prop="distributedTime" label="任务派发时间" align="center" min-width="140" :show-overflow-tooltip="true" v-if="columns.showColumn('distributedTime')" />
|
||||
<el-table-column prop="startTime" label="任务开始时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('startTime')" />
|
||||
<el-table-column prop="endTime" label="任务结束时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('endTime')" />
|
||||
<el-table-column prop="status" label="状态" align="center" v-if="columns.showColumn('status')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="options.statusOptions" :value="scope.row.status" />
|
||||
@ -155,7 +156,8 @@
|
||||
delDeviceTaskExecute,
|
||||
updateDeviceTaskExecute,
|
||||
getDeviceTaskExecute,
|
||||
clearDeviceTaskExecute
|
||||
clearDeviceTaskExecute,
|
||||
setTaskStartTime
|
||||
} from '@/api/deviceManagement/devicetaskexecute.js'
|
||||
import { default as TheTaskExecuteDialog } from './TheTaskExecuteDialog'
|
||||
import importData from '@/components/ImportData'
|
||||
@ -179,7 +181,8 @@
|
||||
{ visible: false, prop: 'id', label: '主键' },
|
||||
{ visible: false, prop: 'taskId', label: '任务id' },
|
||||
{ visible: true, prop: 'taskName', label: '任务名称' },
|
||||
{ visible: true, prop: 'type', label: '任务类型(1是巡检,2是点检)' },
|
||||
{ visible: true, prop: 'persion', label: '执行人' },
|
||||
{ visible: true, prop: 'type', label: '任务类型' },
|
||||
{ visible: true, prop: 'distributedTime', label: '任务派发时间' },
|
||||
{ visible: true, prop: 'startTime', label: '任务执行——开始时间' },
|
||||
{ visible: true, prop: 'endTime', label: '任务执行——结束时间' },
|
||||
@ -254,6 +257,7 @@
|
||||
planType.value = row.type;
|
||||
fkPlanId.value = row.taskId;
|
||||
executeKey.value = row.id;
|
||||
// setTaskStartTime(executeKey.value);
|
||||
// open2.value = true;
|
||||
proxy.$router.push({ name: 'TheTaskExecuteView', query: { planType: row.type, fkPlanId: row.taskId, executeKey: row.id } });
|
||||
// proxy.$router.push({ path: '/deviceManagement/deviceTaskExecute', query: { planType: row.type, fkPlanId: row.taskId, executeKey: row.id } });
|
||||
|
||||
@ -47,15 +47,15 @@
|
||||
</el-row>
|
||||
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border header-cell-class-name="el-table-header-cell" highlight-current-row @sort-change="sortChange">
|
||||
<el-table-column prop="deviceName" label="设备名称" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('deviceName')" />
|
||||
<el-table-column prop="deviceSpecification" label="设备规格" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('deviceSpecification')" />
|
||||
<el-table-column prop="deviceCode" label="设备编号" align="center" width="100px" v-if="columns.showColumn('deviceCode')">
|
||||
<el-table-column prop="deviceName" label="设备名称" align="center" min-width="120px" :show-overflow-tooltip="true" v-if="columns.showColumn('deviceName')" />
|
||||
<el-table-column prop="deviceCode" label="设备编号" align="center" min-width="140px" :show-overflow-tooltip="true" v-if="columns.showColumn('deviceSpecification')" />
|
||||
<el-table-column prop="deviceCode" label="设备二维码" align="center" width="80px" v-if="columns.showColumn('deviceCode')">
|
||||
<template #default="scope">
|
||||
<qrcode-vue style="width: 36px;height: 36px;" :id="scope.row.deviceCode" :value="scope.row.deviceCode" @click="downloadQrCode(scope.row.deviceCode)"></qrcode-vue>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workshop" label="所属车间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('workshop')" />
|
||||
<el-table-column prop="workline" label="所属产线" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('workline')" />
|
||||
<el-table-column prop="workshop" label="所属车间" align="center" min-width="100px" :show-overflow-tooltip="true" v-if="columns.showColumn('workshop')" />
|
||||
<el-table-column prop="workline" label="所属产线" align="center" min-width="100px" :show-overflow-tooltip="true" v-if="columns.showColumn('workline')" />
|
||||
<el-table-column prop="deviceImage" label="设备图片" align="center" v-if="columns.showColumn('deviceImage')">
|
||||
<template #default="scope">
|
||||
<ImagePreview :src="scope.row.deviceImage"></ImagePreview>
|
||||
@ -79,6 +79,7 @@
|
||||
<el-table-column prop="createdTime" label="创建时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('createdTime')" />
|
||||
<el-table-column prop="updatedBy" label="修改人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedBy')" />
|
||||
<el-table-column prop="updatedTime" label="修改时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedTime')" />
|
||||
<el-table-column prop="deviceSpecification" label="设备规格" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('deviceSpecification')" />
|
||||
<el-table-column label="操作" width="240" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="success" size="small" icon="edit" title="编辑" v-hasPermi="['business:deviceaccount:edit']" @click="handleUpdate(scope.row)"></el-button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user