Procházet zdrojové kódy

✨ feat(日报): app跳转

Zimo před 5 dny
rodič
revize
84b09bba42
3 změnil soubory, kde provedl 36 přidání a 10 odebrání
  1. 1 1
      .env.local
  2. 17 0
      src/views/pms/dingding.vue
  3. 18 9
      src/views/pms/iotrydailyreport/xfill.vue

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.149:48080  https://iot.deepoil.cc
-VITE_BASE_URL='http://192.168.188.150:8080'
+VITE_BASE_URL=' https://iot.deepoil.cc'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 17 - 0
src/views/pms/dingding.vue

@@ -103,6 +103,23 @@ onMounted(async () => {
     } else if (type === 'rdReportApproval') {
       window.location.href =
         import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiDu/approval?id=' + id
+    } else if (type === 'rhDailyReport') {
+      window.location.href = import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruihen/edit?id=' + id
+    } else if (type === 'rhReportApproval') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruihen/approval?id=' + id
+    } else if (type === 'ryDailyReport') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiying/edit?id=' + id
+    } else if (type === 'ryReportApproval') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiying/approval?id=' + id
+    } else if (type === 'ryXjDailyReport') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiyingx/edit?id=' + id
+    } else if (type === 'ryXjReportApproval') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiyingx/approval?id=' + id
     } else {
       window.location.href =
         import.meta.env.VITE_BASE_URL +

+ 18 - 9
src/views/pms/iotrydailyreport/xfill.vue

@@ -533,8 +533,6 @@ const sumTimes = () => {
 
 const validateTotalTime = (_rule: any, _value: any, callback: any) => {
   const total = sumTimes()
-  console.log('total :>> ', total)
-  console.log('form.value.ratedProductionTime :>> ', form.value.ratedProductionTime)
   if (total !== form.value.ratedProductionTime) {
     callback(new Error(`生产时间和非生产时间之和必须等于额定生产时间`))
   } else {
@@ -550,7 +548,7 @@ const validateNptReason = (_rule: any, value: any, callback: any) => {
   }
 }
 
-const timeRuleItem = [
+const _timeRuleItem = [
   { required: true, message: '请输入时间', trigger: 'blur' },
   { validator: validateTotalTime, trigger: 'blur' }
 ]
@@ -560,9 +558,9 @@ const rules = reactive<FormRules>({
   productionStatus: [{ required: true, message: '请输入生产动态', trigger: ['change', 'blur'] }],
 
   // 复用规则
-  productionTime: timeRuleItem,
-  nonProductionTime: timeRuleItem,
-  ratedProductionTime: timeRuleItem,
+  // productionTime: timeRuleItem,
+  // nonProductionTime: timeRuleItem,
+  // ratedProductionTime: timeRuleItem,
 
   ryNptReason: [{ validator: validateNptReason, trigger: ['change', 'blur'] }]
 })
@@ -592,6 +590,7 @@ const submitForm = async () => {
     await formRef.value.validate()
     formLoading.value = true
     const { createTime, ...other } = form.value
+
     const data = { ...other, fillOrderCreateTime: createTime, projectClassification: '2' } as any
     await IotRyDailyReportApi.createIotRyDailyReport(data)
     message.success(t('common.updateSuccess'))
@@ -800,15 +799,15 @@ const submitForm = async () => {
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="运行时效" prop="transitTime">
+        <!-- <el-form-item label="运行时效" prop="transitTime">
           <el-input
             :model-value="transitTime.value"
             placeholder="运行时效"
             disabled
-            :class="{ 'warning-input': transitTime.original > 1.2 }"
+            :class="{ 'warning-input': transitTime.original > 1.0 }"
             id="transitTimeInput"
           />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="井别" prop="wellCategory">
           <el-input v-model="form.wellCategory" placeholder="" disabled />
         </el-form-item>
@@ -853,6 +852,7 @@ const submitForm = async () => {
             class="w-full!"
             :min="0"
             v-model="form.ratedProductionTime"
+            :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
             placeholder="请输入额定生产时间(H)"
           />
         </el-form-item>
@@ -861,6 +861,7 @@ const submitForm = async () => {
             class="w-full!"
             :min="0"
             v-model="form.productionTime"
+            :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
             placeholder="请输入生产时间(H)"
           />
         </el-form-item>
@@ -869,6 +870,7 @@ const submitForm = async () => {
             class="w-full!"
             :min="0"
             v-model="form.nonProductionTime"
+            :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
             placeholder="非生产时间(H)"
           />
         </el-form-item>
@@ -948,6 +950,13 @@ const submitForm = async () => {
   }
 }
 
+:deep(.orange-input) {
+  .el-input__inner {
+    color: orange !important;
+    -webkit-text-fill-color: orange !important;
+  }
+}
+
 :deep(.el-input-number) {
   width: 100%;
 }