wyh il y a 1 an
Parent
commit
43535cbe57

+ 2 - 2
src/views/module_base/energyRate/modules/EnergyRateForm.vue

@@ -26,12 +26,12 @@
           </a-col>
           <a-col :xs="24" :sm="12">
             <a-form-model-item label="费率有效期开始" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="begintime">
-              <j-date placeholder="请选择费率有效期开始" v-model="model.begintime" style="width: 100%" />
+              <j-date placeholder="请选择费率有效期开始" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.begintime" style="width: 100%" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12">
             <a-form-model-item label="费率有效期结束" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endtime">
-              <j-date placeholder="请选择费率有效期结束" v-model="model.endtime" style="width: 100%" />
+              <j-date placeholder="请选择费率有效期结束" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.endtime" style="width: 100%" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24">

+ 19 - 19
src/views/module_tpm/tag/TagList.vue

@@ -171,11 +171,11 @@
             align:"center",
             dataIndex: 'tagname'
           },
-          {
-            title:'点位地址',
-            align:"center",
-            dataIndex: 'tagaddress'
-          },
+          // {
+          //   title:'点位地址',
+          //   align:"center",
+          //   dataIndex: 'tagaddress'
+          // },
           {
             title:'点位类型',
             align:"center",
@@ -192,14 +192,14 @@
             dataIndex: 'energyitemid'
           },
           {
-            title:'限',
+            title:'限',
             align:"center",
-            dataIndex: 'min'
+            dataIndex: 'max'
           },
           {
-            title:'限',
+            title:'限',
             align:"center",
-            dataIndex: 'max'
+            dataIndex: 'min'
           },
           {
             title:'报警延时(分钟)',
@@ -216,16 +216,16 @@
             align:"center",
             dataIndex: 'param2'
           },
-          {
-            title:'当前点位值获得时间',
-            align:"center",
-            dataIndex: 'logtime'
-          },
-          {
-            title:'当前点位值',
-            align:"center",
-            dataIndex: 'tagvalue'
-          },
+          // {
+          //   title:'当前点位值获得时间',
+          //   align:"center",
+          //   dataIndex: 'logtime'
+          // },
+          // {
+          //   title:'当前点位值',
+          //   align:"center",
+          //   dataIndex: 'tagvalue'
+          // },
           // {
           //   title:'最后一次报警时间',
           //   align:"center",

+ 11 - 11
src/views/module_tpm/tag/modules/TagForm.vue

@@ -21,34 +21,34 @@
                 </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :span="12">
+          <!-- <a-col :span="12">
             <a-form-model-item label="点位地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tagaddress">
               <a-input v-model="model.tagaddress" placeholder="请输入点位地址"  ></a-input>
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="12">
             <a-form-model-item label="点位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tagtype">
-              <a-input v-model="model.tagtype" placeholder="请输入点位类型"  ></a-input>
+              <j-search-select-tag v-model="model.tagtype" placeholder="请选择点位类型" dict="tpm_tag_type"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item label="能源分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energytypeid">
-              <a-input v-model="model.energytypeid" placeholder="请输入能源分类"  ></a-input>
+              <j-search-select-tag v-model="model.energytypeid" placeholder="请选择能源分类" dict="base_energy_type,name,id"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item label="能源分项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energyitemid">
-              <a-input v-model="model.energyitemid" placeholder="请输入能源分项"  ></a-input>
+              <j-search-select-tag v-model="model.energyitemid" placeholder="请选择能源分项" dict="base_energy_item,energyitemname,id"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="下限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="min">
-              <a-input-number v-model="model.min" placeholder="请输入下限" style="width: 100%" />
+            <a-form-model-item label="上限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="max">
+              <a-input-number v-model="model.max" placeholder="请输入上限" style="width: 100%" />
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="上限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="max">
-              <a-input-number v-model="model.max" placeholder="请输入上限" style="width: 100%" />
+            <a-form-model-item label="下限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="min">
+              <a-input-number v-model="model.min" placeholder="请输入下限" style="width: 100%" />
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -66,7 +66,7 @@
               <a-input v-model="model.param2" placeholder="请输入其他值2"  ></a-input>
             </a-form-model-item>
           </a-col>
-          <a-col :span="12">
+          <!-- <a-col :span="12">
             <a-form-model-item label="当前点位值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tagvalue">
               <a-input-number v-model="model.tagvalue" placeholder="请输入当前点位值" style="width: 100%" />
             </a-form-model-item>
@@ -75,7 +75,7 @@
             <a-form-model-item label="获得时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logtime">
               <j-date placeholder="请选择当前点位值获得时间"  v-model="model.logtime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <!-- <a-col :span="12">
             <a-form-model-item label="最后一次报警时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lastalarmtime">
               <j-date placeholder="请选择最后一次报警时间"  v-model="model.lastalarmtime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />

+ 69 - 33
src/views/module_tpm/tag/modulesPL/TagFormPL1.vue

@@ -62,16 +62,51 @@
                                         {{ record.tagname }}
                                     </a-form-model-item>
                                 </template>
-                                <template slot="tagaddress" slot-scope="text, record,index">
+                                <!-- <template slot="tagaddress" slot-scope="text, record,index">
                                     <a-form-model-item :prop="'data.'+index+'.tagaddress'" :rules="validatorRules.tagaddress" style="margin-bottom: 0px;">
                                         <a-input v-model="record.tagaddress"></a-input>
                                     </a-form-model-item>
-                                </template>
-                                <!-- <template slot="tagtype" slot-scope="text, record,index">
+                                </template> -->
+                                <template slot="tagtype" slot-scope="text, record,index">
                                     <a-form-model-item :prop="'data.'+index+'.tagtype'" :rules="validatorRules.tagtype" style="margin-bottom: 0px;">
-                                        <a-input v-model="record.tagtype"></a-input>
+                                        <j-search-select-tag v-model="record.tagtype" placeholder="请选择点位类型" dict="tpm_tag_type"/>
                                     </a-form-model-item>
-                                </template> -->
+                                </template>
+                                <template slot="energytypeid" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.energytypeid'" :rules="validatorRules.energytypeid" style="margin-bottom: 0px;">
+                                        <j-search-select-tag v-model="record.energytypeid" placeholder="请选择能源分类" dict="base_energy_type,name,id"/>
+                                    </a-form-model-item>
+                                </template>
+                                <template slot="energyitemid" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.energyitemid'" :rules="validatorRules.energyitemid" style="margin-bottom: 0px;">
+                                        <j-search-select-tag v-model="record.energyitemid" placeholder="请选择能源分项" dict="base_energy_item,energyitemname,id"/>
+                                    </a-form-model-item>
+                                </template>
+                                <template slot="max" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.max'" :rules="validatorRules.max" style="margin-bottom: 0px;">
+                                        <a-input-number v-model="record.max" placeholder="请输入上限" style="width: 100%" />
+                                    </a-form-model-item>
+                                </template>
+                                <template slot="min" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.min'" :rules="validatorRules.min" style="margin-bottom: 0px;">
+                                        <a-input-number v-model="record.min" placeholder="请输入下限" style="width: 100%" />
+                                    </a-form-model-item>
+                                </template>
+                                <template slot="delay" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.delay'" :rules="validatorRules.delay" style="margin-bottom: 0px;">
+                                        <a-input-number v-model="record.delay" placeholder="请输入报警延时(分钟)" style="width: 100%" />
+                                    </a-form-model-item>
+                                </template>
+                                <template slot="param1" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.param1'" :rules="validatorRules.param1" style="margin-bottom: 0px;">
+                                        <a-input v-model="record.param1" placeholder="请输入其他值1"  ></a-input>
+                                    </a-form-model-item>
+                                </template>
+                                <template slot="param2" slot-scope="text, record,index">
+                                    <a-form-model-item :prop="'data.'+index+'.param2'" :rules="validatorRules.param2" style="margin-bottom: 0px;">
+                                        <a-input v-model="record.param2" placeholder="请输入其他值2"  ></a-input>
+                                    </a-form-model-item>
+                                </template>
                                 <template slot="operation" slot-scope="text, record">
                                     <span>
                                         <a-popconfirm title="是否要删除此行?" @confirm="remove(record.key)">
@@ -120,15 +155,16 @@ export default {
                 dataIndex: 'tagname',
                 key: 'tagname',
                 align: 'center',
+                width: 120,
                 scopedSlots: { customRender: 'tagname' }
                 },
-                {
-                title: '点位地址',
-                dataIndex: 'tagaddress',
-                key: 'tagaddress',
-                align: 'center',
-                scopedSlots: { customRender: 'tagaddress' }
-                },
+                // {
+                // title: '点位地址',
+                // dataIndex: 'tagaddress',
+                // key: 'tagaddress',
+                // align: 'center',
+                // scopedSlots: { customRender: 'tagaddress' }
+                // },
                 {
                 title: '点位类型',
                 dataIndex: 'tagtype',
@@ -151,13 +187,6 @@ export default {
                 scopedSlots: { customRender: 'energyitemid' }
                 },
                 {
-                title: '下限',
-                dataIndex: 'min',
-                key: 'min',
-                align: 'center',
-                scopedSlots: { customRender: 'min' }
-                },
-                {
                 title: '上限',
                 dataIndex: 'max',
                 key: 'max',
@@ -165,6 +194,13 @@ export default {
                 scopedSlots: { customRender: 'max' }
                 },
                 {
+                title: '下限',
+                dataIndex: 'min',
+                key: 'min',
+                align: 'center',
+                scopedSlots: { customRender: 'min' }
+                },
+                {
                 title: '报警延时(分钟)',
                 dataIndex: 'delay',
                 key: 'delay',
@@ -185,20 +221,20 @@ export default {
                 align: 'center',
                 scopedSlots: { customRender: 'param2' }
                 },
-                {
-                title: '当前点位值',
-                dataIndex: 'tagvalue',
-                key: 'tagvalue',
-                align: 'center',
-                scopedSlots: { customRender: 'tagvalue' }
-                },
-                {
-                title: '获得时间',
-                dataIndex: 'logtime',
-                key: 'logtime',
-                align: 'center',
-                scopedSlots: { customRender: 'logtime' }
-                },
+                // {
+                // title: '当前点位值',
+                // dataIndex: 'tagvalue',
+                // key: 'tagvalue',
+                // align: 'center',
+                // scopedSlots: { customRender: 'tagvalue' }
+                // },
+                // {
+                // title: '获得时间',
+                // dataIndex: 'logtime',
+                // key: 'logtime',
+                // align: 'center',
+                // scopedSlots: { customRender: 'logtime' }
+                // },
                 {
                 title: '操作',
                 key: 'action',