zhulizhen1111 4 years ago
parent
commit
f1e830e4cb

+ 23 - 10
src/components/config_point/toolLibrary/detailDialog.vue

@@ -4,20 +4,20 @@
       <el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
       <el-table-column property="Name" label="名称" show-overflow-tooltip align="center"></el-table-column>
       <el-table-column property="address" label="软件" align="center" width="80">
-        <template slot-scope="scope">
-          <el-button type="text" @click="handleDown(scope.$index,scope.row)">下载</el-button>
+        <template slot-scope="scope" v-if="scope.row.Application">
+          <el-button type="text" @click="handleDown(scope.$index,scope.row,'Application')">下载</el-button>
         </template>
       </el-table-column>
       <el-table-column property="Remark" label="特殊说明" align="center"></el-table-column>
       <el-table-column property="Scope" label="适用厂家" align="center"></el-table-column>
       <el-table-column property="Manual" label="使用说明" align="center" width="80">
-        <template slot-scope="scope">
-          <el-button type="text" @click="handleDown(scope.$index,scope.row)">下载</el-button>
+        <template slot-scope="scope" v-if="scope.row.Manual">
+          <el-button type="text" @click="handleDown(scope.$index,scope.row,'Manual')">下载</el-button>
         </template>
       </el-table-column>
       <el-table-column property="Eg" label="配置示例" align="center" width="80">
-        <template slot-scope="scope">
-          <el-button type="text" @click="handleDown(scope.$index,scope.row)">下载</el-button>
+        <template slot-scope="scope" v-if="scope.row.Eg">
+          <el-button type="text" @click="handleDown(scope.$index,scope.row,'Eg')">下载</el-button>
         </template>
       </el-table-column>
 
@@ -67,11 +67,24 @@
           this.gridData = res.Content
         })
       },
-      handleDown(index, row) {
+      handleDown(index, row,name) {
+        let params
         console.log(row)
-        let params = {
-           Property: "string",
-           ProtocolId: "string"
+        if(name=='Application'){
+          params = {
+            Property: 'Application',
+            ProtocolId: row.Id
+          }
+        }else if(name=='Manual'){
+           params = {
+            Property: 'Manual',
+            ProtocolId: row.Id
+          }
+        }else if(name=='Eg'){
+           params = {
+            Property: 'Eg',
+            ProtocolId: row.Id
+          }
         }
         dowloadProtocol(params,res=>{
         })

+ 4 - 4
src/components/config_point/toolLibrary/settingDialog.vue

@@ -75,16 +75,16 @@
             action="String"
             :on-change="changeItem2"
             >
-            <i class="el-icon-upload"></i>
-          </el-upload><span style="padding-left:20px;" v-if="file2">文件名:{{file2}}</span>
+            <i class="el-icon-upload"></i><span style="padding-left:20px;" v-if="file2">文件名:{{file2}}</span>
+          </el-upload>
         </el-form-item>
         <el-form-item label="配置示例">
          <el-upload
             action="String"
             :on-change="changeItem3"
             >
-            <i class="el-icon-upload"></i>
-          </el-upload><span style="padding-left:20px;" v-if="file3">文件名:{{file3}}</span>
+            <i class="el-icon-upload"></i><span style="padding-left:20px;" v-if="file3">文件名:{{file3}}</span>
+          </el-upload>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

+ 9 - 1
src/views/point/config_point/edit_origin/dialog.vue

@@ -191,6 +191,7 @@
         }
         queryProtocalList(data,res=>{
           console.log(res)
+          this.options = []
           let data = res.Content
           data.forEach(el=>{
              this.options.push({
@@ -206,7 +207,14 @@
         }
         queryTxList(data,res=>{
           console.log(res)
-          this.txOptions = res.Content
+          this.txOptions = []
+          let data = res.Content
+          data.forEach(el=>{
+             this.txOptions.push({
+              label:el.Name,
+              value:el.Name
+            })
+          })
         })
       },
       test(){

+ 8 - 2
src/views/point/toolLibrary/index.vue

@@ -26,13 +26,19 @@
     },
     components: {detailDialog, settingDialog},
     mounted(){
-      //this.queryList()
+      this.queryList()
     },
     methods: {
       queryList(){
         let params = {}
         queryProtocalList(params,res=>{
-          this.list = res.Content
+          this.list = []
+         let data = res.Content
+         data.forEach(el=>{
+           this.list.push({
+             val:el
+           })
+         })
         })
       },
       detailItem(item) {