|
|
@@ -4,8 +4,7 @@
|
|
|
<el-tab-pane
|
|
|
style="height: 100%"
|
|
|
v-for="(deviceItem, deviceIndex) in list"
|
|
|
- :key="deviceIndex"
|
|
|
- >
|
|
|
+ :key="deviceIndex">
|
|
|
<template #label>
|
|
|
<span
|
|
|
:class="['custom-label', { 'has-border': deviceItem.deviceName === '生产日报' }]"
|
|
|
@@ -18,8 +17,7 @@
|
|
|
deviceItem.deviceName,
|
|
|
deviceItem.deviceCode
|
|
|
)
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
{{ deviceItem.deviceCode }} ({{ deviceItem.deviceName }})
|
|
|
</span>
|
|
|
<span
|
|
|
@@ -33,8 +31,7 @@
|
|
|
deviceItem.deviceName,
|
|
|
deviceItem.deviceCode
|
|
|
)
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
{{ deviceItem.deviceCode }} ({{ deviceItem.deviceName }})
|
|
|
</span>
|
|
|
</template>
|
|
|
@@ -44,8 +41,7 @@
|
|
|
size="default"
|
|
|
label-width="120px"
|
|
|
class="scrollable-form"
|
|
|
- :model="{ attrList: attrList, reportDetails, taskId }"
|
|
|
- >
|
|
|
+ :model="{ attrList: attrList, reportDetails, taskId }">
|
|
|
<div style="margin-left: 24px">
|
|
|
<el-form class="demo-form-inline" :inline="true">
|
|
|
<el-form-item :label="t('common.createTime')" class="custom-label1">
|
|
|
@@ -65,8 +61,7 @@
|
|
|
companyName !== 'rh'
|
|
|
"
|
|
|
label="井号"
|
|
|
- class="custom-label1"
|
|
|
- >
|
|
|
+ class="custom-label1">
|
|
|
<span style="text-decoration: underline">
|
|
|
{{ deviceItem.wellName }}
|
|
|
</span>
|
|
|
@@ -79,20 +74,17 @@
|
|
|
"
|
|
|
label="井号"
|
|
|
class="custom-label1"
|
|
|
- prop="taskId"
|
|
|
- >
|
|
|
+ prop="taskId">
|
|
|
<el-select
|
|
|
v-model="taskId"
|
|
|
placeholder="请选择井号"
|
|
|
:options="taskOptions"
|
|
|
- class="w-40!"
|
|
|
- />
|
|
|
+ class="w-40!" />
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
v-else-if="deviceItem.deviceName === '生产日报'"
|
|
|
label="井号"
|
|
|
- class="custom-label1"
|
|
|
- >
|
|
|
+ class="custom-label1">
|
|
|
<span style="text-decoration: underline">
|
|
|
{{ deviceItem.wellName }}
|
|
|
</span>
|
|
|
@@ -101,8 +93,7 @@
|
|
|
<el-col
|
|
|
v-for="(summaryItem, summaryIndex) in attrList1"
|
|
|
:key="summaryIndex"
|
|
|
- :span="24"
|
|
|
- >
|
|
|
+ :span="24">
|
|
|
<el-form-item :label="summaryItem.name" class="custom-label1">
|
|
|
<span style="text-decoration: underline">
|
|
|
{{ summaryItem.totalRunTime }}
|
|
|
@@ -123,8 +114,7 @@
|
|
|
(item) => !keys.includes(item.description)
|
|
|
)"
|
|
|
:key="attrIndex"
|
|
|
- style="margin-left: 24px"
|
|
|
- >
|
|
|
+ style="margin-left: 24px">
|
|
|
<!-- 添加提示文字 -->
|
|
|
<div v-if="attrItem.isCollection === 1" class="plc-tip">
|
|
|
<el-alert
|
|
|
@@ -133,8 +123,7 @@
|
|
|
:closable="false"
|
|
|
center
|
|
|
show-icon
|
|
|
- style="width: 320px"
|
|
|
- />
|
|
|
+ style="width: 320px" />
|
|
|
</div>
|
|
|
|
|
|
<el-form-item
|
|
|
@@ -146,15 +135,13 @@
|
|
|
'.fillContent'
|
|
|
"
|
|
|
label-position="top"
|
|
|
- :rules="rules[attrItem.description]"
|
|
|
- >
|
|
|
+ :rules="rules[attrItem.description]">
|
|
|
<div v-if="fillStatus === '1'">
|
|
|
<el-select
|
|
|
disabled
|
|
|
v-model="attrItem.fillContent"
|
|
|
v-if="attrItem.type === 'enum' && attrItem.description !== null"
|
|
|
- style="width: 200px"
|
|
|
- >
|
|
|
+ style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="dict in attrItem.name === '非生产原因'
|
|
|
? getIntDictOptions(attrItem.description)
|
|
|
@@ -163,16 +150,14 @@
|
|
|
:label="dict.label"
|
|
|
:value="
|
|
|
attrItem.name === '非生产原因' ? Number(dict.value) : dict.value.toString()
|
|
|
- "
|
|
|
- />
|
|
|
+ " />
|
|
|
</el-select>
|
|
|
<el-input
|
|
|
v-else
|
|
|
v-model="attrItem.fillContent"
|
|
|
clearable
|
|
|
style="width: 200px; margin-right: 10px"
|
|
|
- disabled
|
|
|
- />
|
|
|
+ disabled />
|
|
|
</div>
|
|
|
|
|
|
<el-input
|
|
|
@@ -180,15 +165,13 @@
|
|
|
v-model="attrItem.fillContent"
|
|
|
type="textarea"
|
|
|
clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ style="width: 200px" />
|
|
|
<el-select
|
|
|
v-model="attrItem.fillContent"
|
|
|
clearable
|
|
|
v-else-if="attrItem.type === 'enum' && attrItem.description !== null"
|
|
|
style="width: 200px"
|
|
|
- filterable
|
|
|
- >
|
|
|
+ filterable>
|
|
|
<el-option
|
|
|
v-for="dict in attrItem.name === '非生产原因'
|
|
|
? getIntDictOptions(attrItem.description)
|
|
|
@@ -197,8 +180,7 @@
|
|
|
:label="dict.label"
|
|
|
:value="
|
|
|
attrItem.name === '非生产原因' ? Number(dict.value) : dict.value.toString()
|
|
|
- "
|
|
|
- />
|
|
|
+ " />
|
|
|
</el-select>
|
|
|
<el-input
|
|
|
v-else
|
|
|
@@ -211,16 +193,16 @@
|
|
|
: t('operationFillForm.enterContent')
|
|
|
"
|
|
|
@input="handleInput(attrItem)"
|
|
|
- :maxlength="attrItem.type === 'double' ? calculateMaxLength(attrItem) : undefined"
|
|
|
- />
|
|
|
+ :maxlength="
|
|
|
+ attrItem.type === 'double' ? calculateMaxLength(attrItem) : undefined
|
|
|
+ " />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
v-for="(attrItem, attrIndex) in attrList"
|
|
|
:key="attrIndex"
|
|
|
- style="margin-left: 24px"
|
|
|
- >
|
|
|
+ style="margin-left: 24px">
|
|
|
<el-divider v-if="attrItem.description === 'repairTime'" content-position="left"
|
|
|
>非生产时间</el-divider
|
|
|
>
|
|
|
@@ -231,8 +213,7 @@
|
|
|
label-position="top"
|
|
|
:label="attrItem.name"
|
|
|
:prop="'attrList.' + attrIndex + '.fillContent'"
|
|
|
- :rules="rules[attrItem.description]"
|
|
|
- >
|
|
|
+ :rules="rules[attrItem.description]">
|
|
|
<el-input-number
|
|
|
class="w-80!"
|
|
|
:min="0"
|
|
|
@@ -241,8 +222,7 @@
|
|
|
:controls="false"
|
|
|
align="left"
|
|
|
placeholder="请输入数字"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- />
|
|
|
+ :disabled="fillStatus === '1'" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item
|
|
|
@@ -250,14 +230,12 @@
|
|
|
label-position="top"
|
|
|
:label="attrItem.name"
|
|
|
:prop="'attrList.' + attrIndex + '.fillContent'"
|
|
|
- :rules="rules[attrItem.description]"
|
|
|
- >
|
|
|
+ :rules="rules[attrItem.description]">
|
|
|
<el-input
|
|
|
class="w-80!"
|
|
|
v-model="attrItem.fillContent"
|
|
|
placeholder="请输入其他非生产原因"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- />
|
|
|
+ :disabled="fillStatus === '1'" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
@@ -274,8 +252,7 @@
|
|
|
type="primary"
|
|
|
link
|
|
|
:icon="Plus"
|
|
|
- @click="addProductionStatusRow"
|
|
|
- >
|
|
|
+ @click="addProductionStatusRow">
|
|
|
添加一行
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -292,8 +269,7 @@
|
|
|
message: '请选择日期',
|
|
|
trigger: ['change', 'blur'],
|
|
|
type: 'number'
|
|
|
- }"
|
|
|
- >
|
|
|
+ }">
|
|
|
<el-date-picker
|
|
|
v-model="row.reportDate"
|
|
|
placeholder="选择日期"
|
|
|
@@ -301,8 +277,7 @@
|
|
|
class="w-full!"
|
|
|
value-format="x"
|
|
|
:disabled="fillStatus === '1'"
|
|
|
- @change="inputCurrentDepth()"
|
|
|
- />
|
|
|
+ @change="inputCurrentDepth()" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</ZmTableColumn>
|
|
|
@@ -317,8 +292,7 @@
|
|
|
required: true,
|
|
|
message: '请选择开始时间',
|
|
|
trigger: ['change', 'blur']
|
|
|
- }"
|
|
|
- >
|
|
|
+ }">
|
|
|
<el-time-picker
|
|
|
v-model="row.startTime"
|
|
|
placeholder="选择开始时间"
|
|
|
@@ -327,8 +301,7 @@
|
|
|
value-format="HH:mm"
|
|
|
class="w-full!"
|
|
|
@change="acalculateDuration(row)"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- />
|
|
|
+ :disabled="fillStatus === '1'" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</ZmTableColumn>
|
|
|
@@ -342,8 +315,7 @@
|
|
|
required: true,
|
|
|
message: '请选择结束时间',
|
|
|
trigger: ['change', 'blur']
|
|
|
- }"
|
|
|
- >
|
|
|
+ }">
|
|
|
<el-time-picker
|
|
|
v-model="row.endTime"
|
|
|
placeholder="选择结束时间"
|
|
|
@@ -352,8 +324,7 @@
|
|
|
value-format="HH:mm"
|
|
|
class="w-full!"
|
|
|
@change="acalculateDuration(row)"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- />
|
|
|
+ :disabled="fillStatus === '1'" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</ZmTableColumn>
|
|
|
@@ -369,8 +340,7 @@
|
|
|
message: '请输入工况',
|
|
|
trigger: ['change', 'blur']
|
|
|
}"
|
|
|
- class="mb-0!"
|
|
|
- >
|
|
|
+ class="mb-0!">
|
|
|
<el-input
|
|
|
v-model="row.currentOperation"
|
|
|
type="textarea"
|
|
|
@@ -378,8 +348,7 @@
|
|
|
show-word-limit
|
|
|
:maxlength="1000"
|
|
|
placeholder="请输入工况"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- />
|
|
|
+ :disabled="fillStatus === '1'" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</ZmTableColumn>
|
|
|
@@ -397,8 +366,7 @@
|
|
|
}
|
|
|
// { validator: validateLastCurrentDepth, trigger: ['change', 'blur'] }
|
|
|
]"
|
|
|
- class="mb-0!"
|
|
|
- >
|
|
|
+ class="mb-0!">
|
|
|
<el-input-number
|
|
|
v-model="row.currentDepth"
|
|
|
:min="0"
|
|
|
@@ -407,8 +375,7 @@
|
|
|
align="left"
|
|
|
placeholder="请输入结束井深"
|
|
|
@input="() => inputCurrentDepth()"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- >
|
|
|
+ :disabled="fillStatus === '1'">
|
|
|
<template #suffix> m </template>
|
|
|
</el-input-number>
|
|
|
</el-form-item>
|
|
|
@@ -421,8 +388,7 @@
|
|
|
v-if="$index >= 0"
|
|
|
:prop="`reportDetails.${$index}.constructionDetail`"
|
|
|
:rules="{ required: true, message: '请输入详细描述', trigger: 'blur' }"
|
|
|
- class="mb-0!"
|
|
|
- >
|
|
|
+ class="mb-0!">
|
|
|
<el-input
|
|
|
v-model="row.constructionDetail"
|
|
|
type="textarea"
|
|
|
@@ -430,8 +396,7 @@
|
|
|
show-word-limit
|
|
|
:maxlength="1000"
|
|
|
placeholder="请输入详细描述"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- />
|
|
|
+ :disabled="fillStatus === '1'" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</ZmTableColumn>
|
|
|
@@ -443,8 +408,7 @@
|
|
|
type="danger"
|
|
|
:icon="Delete"
|
|
|
@click="removeProductionStatusRow($index)"
|
|
|
- :disabled="fillStatus === '1'"
|
|
|
- >
|
|
|
+ :disabled="fillStatus === '1'">
|
|
|
删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -747,8 +711,14 @@ const rules = reactive<FormRules>({
|
|
|
const dailyInjectGasTime =
|
|
|
attrList.value.find((item) => item.description === 'dailyInjectGasTime')?.fillContent || 0
|
|
|
|
|
|
- if (dailyInjectGasTime > 0 && !(value > 0)) {
|
|
|
- return callback(new Error('当日运转时间大于0,注气量也需要大于0'))
|
|
|
+ // if (dailyInjectGasTime > 0 && !(value > 0)) {
|
|
|
+ // return callback(new Error('当日运转时间大于0,注气量也需要大于0'))
|
|
|
+ // }
|
|
|
+
|
|
|
+ const hasDailyGasInjection = value !== undefined && value !== null && value !== ''
|
|
|
+
|
|
|
+ if (dailyInjectGasTime > 0 && !hasDailyGasInjection) {
|
|
|
+ return callback(new Error('当日运转时间大于0,需要填写当日注气量'))
|
|
|
}
|
|
|
|
|
|
callback()
|