dongjh преди 1 година
родител
ревизия
557cdf8699
променени са 2 файла, в които са добавени 38 реда и са изтрити 116 реда
  1. 18 48
      src/views/modules_guAn/guantest/index.vue
  2. 20 68
      src/views/modules_guAn/guantest/testmodal.vue

+ 18 - 48
src/views/modules_guAn/guantest/index.vue

@@ -6,8 +6,8 @@
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="12">
           <a-col :md="7" :sm="8">
-            <a-form-item label="参数名称" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
-              <a-input placeholder="请输入参数名称" v-model="queryParam.paramName"></a-input>
+            <a-form-item label="试验名称" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
+              <a-input placeholder="请输入试验名称" v-model="queryParam.testname"></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="7" :sm="8">
@@ -21,10 +21,10 @@
 
       <div class="table-operator" style="border-top: 5px">
         <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
-        <a-button type="primary" icon="download" @click="handleExportXls('大屏参数设置信息')">导出</a-button>
+        <!-- <a-button type="primary" icon="download" @click="handleExportXls('试验信息')">导出</a-button>
         <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
           <a-button type="primary" icon="import">导入</a-button>
-        </a-upload>
+        </a-upload> -->
       </div>
 
       <a-table
@@ -49,7 +49,7 @@
       </a-table>
 
     </div>
-    <dash-param-modal ref="modalForm" @ok="modalFormOk"></dash-param-modal>  <!-- 编辑 -->
+    <guan-test-modal ref="modalForm" @ok="modalFormOk"></guan-test-modal>  <!-- 编辑 -->
   </a-card>
 </template>
 
@@ -64,14 +64,14 @@
   export default {
     name: "guantest",
     mixins:[JeecgListMixin],
-    components: {DashParamModal},
+    components: {GuanTestModal},
     data() {
       return {
-        description: '这是大屏展示参数页面',
+        description: '这是试验信息页面',
         visible: false,
         // 查询条件
         queryParam: {
-          paramName: "",
+          testname: "",
         },
         // 表头
         columns: [
@@ -86,54 +86,24 @@
             }
           },
           {
-            title: '大屏参数名称',
+            title: '试验名称',
             align: "left",
-            dataIndex: 'paramName',
+            dataIndex: 'testname',
           },
           {
-            title: 'webaccess点名',
+            title: '试验类型',
             align: "left",
-            dataIndex: 'tagName',
+            dataIndex: 'testtype',
           },
           {
-            title: '是否启用',
-            align: "center",
-            dataIndex: 'status',
-            customRender: function (text) {
-              if (text == "0") {
-                return "禁用";
-              } else if (text == "1") {
-                return "启用";
-              }
-              else {
-                return text;
-              }
-            }
-          },
-          {
-            title: '是否获取历史记录',
-            align: "center",
-            dataIndex: 'iflog',
-            customRender: function (text) {
-              if (text == "Y") {
-                return "是";
-              } else if (text == "N") {
-                return "否";
-              }
-              else {
-                return text;
-              }
-            }
+            title: '试验条件',
+            align: "left",
+            dataIndex: 'conditions',
           },
-          // {
-          //   title: '获取历史记录条数',
-          //   align: "left",
-          //   dataIndex: 'records',
-          // },
           {
-            title: '获取历史记录时长(H)',
+            title: '客户名称',
             align: "left",
-            dataIndex: 'duration',
+            dataIndex: 'clientname',
           },
           {
             title: '操作',
@@ -186,7 +156,7 @@
       // 重置字典类型搜索框的内容
       searchReset() {
         var that = this;
-        that.queryParam.paramName = "";
+        that.queryParam.testname = "";
         that.loadData(this.ipagination.current);
       },
     },

+ 20 - 68
src/views/modules_guAn/guantest/testmodal.vue

@@ -14,86 +14,41 @@
         <a-form-model-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          prop="paramName"
-          label="大屏参数名称">
-          <a-input placeholder="请输入大屏参数名称" v-model="model.paramName"/>
+          prop="testname"
+          label="试验名称">
+          <a-input placeholder="请输入试验名称" v-model="model.testname"/>
         </a-form-model-item>
 
         <a-form-model-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          prop="tagName"
-          label="webaccess点名">
-          <a-input placeholder="请输入webaccess点名" v-model="model.tagName" />
+          prop="testtype"
+          label="试验类型">
+          <a-input placeholder="请输入试验类型" v-model="model.testtype" />
         </a-form-model-item>
 
         <a-form-model-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="状态"
-          hasFeedback>
-            <a-select placeholder="请选择" default-value="1" v-model="model.status">
-              <a-select-option value="1">启用</a-select-option>
-              <a-select-option value="0">禁用</a-select-option>
-            </a-select>
+          prop="conditions"
+          label="试验条件">
+          <a-textarea :rows="5" placeholder="请输入试验条件" v-model="model.conditions" />
         </a-form-model-item>
 
         <a-form-model-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="是否获取历史记录"
-          hasFeedback>
-            <a-select placeholder="请选择" default-value="N" v-model="model.iflog">
-              <a-select-option value="Y">是</a-select-option>
-              <a-select-option value="N">否</a-select-option>
-            </a-select>
-        </a-form-model-item>
-
-        <!-- <a-form-model-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="records"
-          v-if="model.iflog=='Y'"
-          label="获取历史记录条数">
-          <a-input-number placeholder="获取历史记录条数" v-model="model.records" />
-        </a-form-model-item> -->
-
-        <a-form-model-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="duration"
-          v-if="model.iflog=='Y'"
-          label="获取历史记录时长(H)">
-          <a-input-number placeholder="获取历史记录时长(H)" v-model="model.duration" />
+          prop="clientname"
+          label="客户名称">
+          <a-input placeholder="请输入客户名称" v-model="model.clientname" />
         </a-form-model-item>
 
         <a-form-model-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          prop="intervals"
-          v-if="model.iflog=='Y'"
-          label="每笔数据之间隔时间">
-          <a-input-number placeholder="每笔数据之间隔时间" v-model="model.intervals" />
-          <a-select placeholder="请选择时间单位" default-value="M" style="width:100px;" v-model="model.intervaltype">
-            <!-- <a-select-option value="S">秒</a-select-option> -->
-            <a-select-option value="M">分</a-select-option>
-            <!-- <a-select-option value="H">时</a-select-option>
-            <a-select-option value="D">日</a-select-option> -->
-          </a-select>
-        </a-form-model-item>
-
-        <a-form-model-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="datatype"
-          v-if="model.iflog=='Y'"
-          label="数据型态">
-          <a-select placeholder="请选择数据型态" default-value="0" v-model="model.datatype">
-            <a-select-option value="0">最后值</a-select-option>
-            <a-select-option value="1">最小值</a-select-option>
-            <a-select-option value="2">最大值</a-select-option>
-            <a-select-option value="3">平均值</a-select-option>
-          </a-select>
+          prop="linker"
+          label="联系人">
+          <a-input placeholder="请输入联系人" v-model="model.linker" />
         </a-form-model-item>
 
       </a-form-model>
@@ -125,8 +80,8 @@
         },
         confirmLoading: false,
         validatorRules: {
-          paramName:  [{required: true, message: '请输入大屏参数名称!'}],
-          tagName:  [{required: true, message: '请输入webaccess点名!'}],
+          testname:  [{required: true, message: '请输入试验名称!'}],
+          testtype:  [{required: true, message: '请输入试验类型!'}],
         },
       }
     },
@@ -135,7 +90,7 @@
     methods: {
       add() {
         //初始化默认值
-        this.edit({iflog:"N",status:"1"});
+        this.edit({});
       },
       edit(record) {
         // this.status = record.status;
@@ -161,14 +116,11 @@
         this.$refs.form.validate(valid => {
           if (valid) {
             that.confirmLoading = true;
-            if (this.model.iflog=='N') {
-              this.model.records=0;
-            }
             let obj;
             if (!this.model.id) {
-              obj = addDashParam(this.model);
+              obj = addGuanTest(this.model);
             } else {
-              obj = editDashParam(this.model);
+              obj = editGuanTest(this.model);
             }
             obj.then((res) => {
               if (res.success) {