Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 1 rok pred
rodič
commit
489c71ee2e

+ 15 - 0
src/api/repair/application-form.js

@@ -540,3 +540,18 @@ export function repairCancel (parameter) {
     method: 'PUT'
   })
 }
+/**
+ * 根据设备id获取维修专业
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function receiveProfessor (parameter) {
+  return axios({
+    url: '/sb/infos/gain/repair/professor/' + parameter.id,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 2 - 2
src/views/check/checkstandard/CheckStandard.vue

@@ -231,8 +231,8 @@ export default {
           }
         },
         {
-          title: '设备号',
-          dataIndex: 'sbNo',
+          title: '设备号',
+          dataIndex: 'positionNo',
           checked: true,
           width: '100px'
         },

+ 18 - 7
src/views/check/checkstandard/modules/BaseForm.vue

@@ -28,17 +28,27 @@
         </row-item>
         <row-item>
           <a-form-item
-            label="设备编号"
+            label="设备名称"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
               disabled
               style="width: 80%"
-              v-decorator="['sbNo', {rules: [{required: false, message: '请选择设备'}]}]"/>
+              v-decorator="['sbName', {rules: [{required: false, message: '请选择设备'}]}]"/>
             <a-button type="primary" style="width: 20%" @click="handleSbSelect">选择</a-button>
           </a-form-item>
         </row-item>
+        <row-item>
+          <a-form-item
+            label="设备位号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['positionNo', {rules: [{required: true, message: '设备位号不能为空'}]}]" />
+          </a-form-item>
+        </row-item>
         <row-item>
           <a-form-item
             label="标准名称"
@@ -58,7 +68,7 @@
             <a-input
               style="width: 80%"
               v-decorator="['partName']"/>
-<!--            <a-button type="primary" style="width: 20%" @click="handlePartSelect">选择</a-button>-->
+            <!--            <a-button type="primary" style="width: 20%" @click="handlePartSelect">选择</a-button>-->
           </a-form-item>
         </row-item>
         <row-item>
@@ -296,7 +306,7 @@
         </row-item>
       </row-list>
     </a-form>
-<!--    <title-divider title="关联备件" width="100px"></title-divider>
+    <!--    <title-divider title="关联备件" width="100px"></title-divider>
     <div class="table-operator" style="margin-bottom: 8px;">
       <a-button style="margin-left:8px;" type="primary" @click="handleSpareSelect">
         <a-icon type="plus"/>
@@ -517,6 +527,8 @@ export default {
           'sbId',
           'sbNo',
           'name',
+          'sbName',
+          'positionNo',
           // 'no',
           // 'type',
           'period',
@@ -592,9 +604,8 @@ export default {
       this.$nextTick(() => {
         setFieldsValue(Object.assign({
           'sbId': key,
-          'sbNo': row.no,
-          'part': null,
-          'partName': null
+          'sbName': row.name,
+          'positionNo': row.positionNo
         }))
       })
     },

+ 5 - 1
src/views/remote/opc-log/modules/Detail.vue

@@ -206,7 +206,11 @@ export default {
         showCrosshairs: true, // 展示 Tooltip 辅助线
         shared: true
       })
-
+      this.chart.scale({
+        sale: {
+          min: 0
+        }
+      })
       // 几何图形 Geometry;
       // 使用 line 绘制折线图
       // 使用 position 通道将对应的变量映射到 x 和 y 位置空间上;

+ 14 - 9
src/views/repair/application-form/modules/BaseForm.vue

@@ -62,7 +62,7 @@
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              v-decorator="['positionNo']" />
+              v-decorator="['positionNo', {rules: [{required: true, message: '设备位号不能为空'}]}]" />
           </a-form-item>
         </row-item>
         <!-- <row-item>
@@ -128,7 +128,7 @@
             <a-tree-select
               tree-checkable
               :show-checked-strategy="SHOW_PARENT"
-              v-decorator="['repairProfessor', {initialValue: [1], rules: [{required: true, message: '检修专业不能为空'}]}]"
+              v-decorator="['repairProfessor', { rules: [{required: true, message: '检修专业不能为空'}]}]"
               placeholder="请选择">
               <a-tree-select-node
                 v-for="(label,value) in professorMap"
@@ -476,7 +476,7 @@
 <script>
 import pick from 'lodash.pick'
 import BaseTool from '../../../../utils/tool'
-import { addRepairApplicationForm, updateRepairApplicationForm, getSbPositions, getDispatchUser } from '@/api/repair/application-form'
+import { addRepairApplicationForm, updateRepairApplicationForm, getSbPositions, getDispatchUser, receiveProfessor } from '@/api/repair/application-form'
 import PartInfoSelectModal from '@/views/part/info/modules/PartInfoSelectModal'
 import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
 import { queryUser } from '@/api/upms/user'
@@ -760,13 +760,18 @@ export default {
       const { form: { setFieldsValue } } = this
       this.sbId = key
       // 日期处理
-      this.$nextTick(() => {
-        setFieldsValue(Object.assign({
-          'sbId': key,
-          'sbName': row.name,
-          'sbCph': row.cph
+
+      receiveProfessor({ id: key }).then(res => {
+        const val = res.data ? res.data : 1
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign({
+            'sbId': key,
+            'sbName': row.name,
+            'sbCph': row.cph,
+            'repairProfessor': [val]
           // 'parentSbNo': row.ppNo
-        }))
+          }))
+        })
       })
     },
     handlePartSelect () {

+ 1 - 1
src/views/repair/application-form/modules/TicketForm.vue

@@ -249,7 +249,7 @@
             <td colspan="29" >
               <div>
                 1、委托内容描述:<br/>
-                <a-textarea v-model="value5" disabled="disabled" style="resize:none;border:none;width:100%;" :rows="4"/>
+                {{ value5 }}
               </div>
             </td>
             <td colspan="1" rowspan="4" style="width: 10px;">委<br/>托<br/>单<br/>位<br/>填<br/>写</td>