|
|
@@ -136,8 +136,13 @@
|
|
|
<el-form-item
|
|
|
v-if="companyName === 'ry' ? attrItem.description !== 'productionStatus' : true"
|
|
|
:label="attrItem.name"
|
|
|
- prop="deviceId"
|
|
|
+ :prop="
|
|
|
+ 'attrList.' +
|
|
|
+ attrList.findIndex((i) => i.description === attrItem.description) +
|
|
|
+ '.fillContent'
|
|
|
+ "
|
|
|
label-position="top"
|
|
|
+ :rules="rules[attrItem.description]"
|
|
|
>
|
|
|
<div v-if="fillStatus === '1'">
|
|
|
<el-select
|
|
|
@@ -727,6 +732,26 @@ const rules = reactive<FormRules>({
|
|
|
{ required: true, message: '请输入进尺工作时间' },
|
|
|
{ validator: ryValidateTotalTime() }
|
|
|
],
|
|
|
+ dailyGasInjection: [
|
|
|
+ {
|
|
|
+ validator: (_rule, value, callback) => {
|
|
|
+ if (companyName.value === 'rh') {
|
|
|
+ const dailyInjectGasTime = attrList.value.find(
|
|
|
+ (item) => item.description === 'dailyInjectGasTime'
|
|
|
+ )
|
|
|
+
|
|
|
+ if (dailyInjectGasTime && dailyInjectGasTime.fillContent > 0) {
|
|
|
+ if (value > 0) {
|
|
|
+ callback()
|
|
|
+ } else {
|
|
|
+ callback(new Error('当日运转时间大于0,注气量也需要大于0'))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
otherProductionTime: [{ validator: ryValidateTotalTime() }],
|
|
|
// ratedProductionTime: [
|
|
|
// { required: true, message: '请输入额定生产时间', trigger: 'blur' },
|
|
|
@@ -812,7 +837,7 @@ const getList = async () => {
|
|
|
|
|
|
const daily = list.value.find((item) => item.deviceName === '生产日报') ?? { wellNamePair: {} }
|
|
|
|
|
|
- taskOptions.value = Object.keys(daily.wellNamePair).map((key) => ({
|
|
|
+ taskOptions.value = Object.keys(daily.wellNamePair ?? {}).map((key) => ({
|
|
|
label: daily.wellNamePair[key],
|
|
|
value: Number(key)
|
|
|
}))
|