heyang 2 年之前
父节点
当前提交
f6b047827a
共有 4 个文件被更改,包括 267 次插入2 次删除
  1. 2 2
      .env.production
  2. 8 0
      src/api/laboratory/apkfile.js
  3. 10 0
      src/views/system/apkfile/index.vue
  4. 247 0
      src/views/system/apkfileList/index.vue

+ 2 - 2
.env.production

@@ -6,9 +6,9 @@ ENV = 'production'
 
 # ####################外网接口配置####################
 
-VUE_APP_BASE_API = 'lab.sxitdlc.com/labAppTest'
+VUE_APP_BASE_API = 'znyj.labcenter.suda.edu.cn/labSystem'
 
 
 # ####################内网接口配置####################
 
-VUE_APP_BASE_LOCAL_API = '192.168.1.43/labSystem'
+VUE_APP_BASE_LOCAL_API = '10.20.10.7/labSystem'

+ 8 - 0
src/api/laboratory/apkfile.js

@@ -87,3 +87,11 @@ export function addApkUpload(query) {
     params: query
   })
 }
+// 获取APK列表------------------------------------------------------------
+export function apkUploadList(query) {
+  return request({
+    url: '/laboratory/apkfile/apkUploadList',
+    method: 'get',
+    params: query
+  })
+}

+ 10 - 0
src/views/system/apkfile/index.vue

@@ -174,6 +174,15 @@
 
             />
           </el-form-item>
+          <el-form-item label="版本描述" prop="version" label-width="90px">
+            <el-input
+              type="textarea"
+              v-model="upForm.apkInfo"
+              maxLength="1000"
+              placeholder="请输入版本描述"
+              clearable
+            />
+          </el-form-item>
           <el-form-item label="类型" prop="onepcType" style="display: block" label-width="90px">
             <el-radio v-model="upForm.onepcType" label="1">管控一体机</el-radio>
             <el-radio v-model="upForm.onepcType" label="2">考试一体机</el-radio>
@@ -562,6 +571,7 @@
             let obj = {
               versionName:this.upForm.versionName,
               version:this.upForm.version,
+              apkInfo:this.upForm.apkInfo,
               onepcType:this.upForm.onepcType,
               apkFileUpload:this.upForm.apkFileUpload,
             };

+ 247 - 0
src/views/system/apkfileList/index.vue

@@ -0,0 +1,247 @@
+<template>
+  <div class="app-container apkfile">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="关键字" prop="subName" label-width="95px">
+        <el-input
+          v-model="queryParams.versionName"
+          placeholder="版本名称"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="设备类型" prop="onepcType" label-width="75px">
+        <el-select v-model="queryParams.onepcType" placeholder="请选择设备类型" clearable size="small">
+          <el-option label="管控一体机" value="1" />
+          <el-option label="考试一体机" value="2" />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <p class="inquire-button-one" @click="handleQuery">查询</p>
+        <p class="reset-button-one" @click="resetQuery">重置</p>
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="logList">
+      <el-table-column label="versionName" align="left" prop="subName" />
+      <el-table-column label="设备名称" align="left" prop="hardName" />
+      <el-table-column label="设备类型" align="left" prop="onepcType" >
+        <template slot-scope="scope">
+          <p>{{scope.row.onepcType==1?'管控一体机':(scope.row.onepcType==2?'考试一体机':'')}}</p>
+        </template>
+      </el-table-column>
+      <el-table-column label="版本名称" align="left" prop="versionName" />
+      <el-table-column label="版本编号" align="left" prop="version" />
+      <el-table-column label="状态" align="left" prop="logStatus" >
+        <template slot-scope="scope">
+          <p>{{scope.row.logStatus==0?'安装失败':(scope.row.logStatus==1?'安装成功':(scope.row.logStatus==2?'安装中':(scope.row.logStatus==3?'上传成功':'')))}}</p>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="left" prop="createTime" />
+      <el-table-column label="操作" align="left" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <div class="button-box">
+            <p class="table-button-one-90"
+               @click="handleUpdate(scope.row)"
+               v-hasPermi="['laboratory:apkfile:edit']"
+            ><i class="el-icon-edit-outline"></i>修改</p>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination :page-sizes="[20, 30, 40, 50]"
+      v-show="total>0"
+      :total="total"
+      layout="total, prev, pager, next, sizes, jumper"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+  import { listLog, apkUploadList, delLog, addLog, updateLog, getApkUploadList,apkFileAddApkLog,updateApkLog,getApkUploadListByLimit,addApkUpload } from "@/api/laboratory/apkfile";
+  import { getToken } from "@/utils/auth";
+  export default {
+    name: "Log",
+    data() {
+      return {
+        headers: {
+          Authorization: "Bearer " + getToken()
+        },
+        // 遮罩层
+        loading: true,
+
+
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // apk需要对应升级的日志表格数据
+        logList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize:20,
+          searchValue: null,
+          versionName: null,
+          onepcType: null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+          deptId: [
+            { required: true, message: "请选择院系", trigger: "blur" }
+          ],
+          apkId: [
+            { required: true, message: "分类名称不能为空", trigger: "blur" }
+          ],
+          onepcType2: [
+            { required: true, message: "设备类型不能为空", trigger: "blur" }
+          ],
+        },
+        onepcTypeList:[
+          {id:1,name:"管控一体机",},
+          {id:2,name:"考试一体机",}
+        ],
+        //实验室列表
+        subjectOptions: [],
+        //文件列表
+        fileList:[],
+
+        //apk列表
+        apkIdOptions:[],
+        //apk 列表查询参数
+        apkQueryParams: {
+          pageNum: 1,
+          pageSize:20,
+        },
+
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+
+      /** 查询apk需要对应升级的日志列表 */
+      getList() {
+        this.loading = true;
+        apkUploadList(this.queryParams).then( response => {
+          this.logList =  response.rows;
+          this.total =  response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+      },
+      // 取消按钮
+      cancelUp() {
+        if (this.loading){
+          return
+        }
+        this.fileList=[];
+        // this.$refs.uploader.files = [];
+        // this.$refs.uploader.fileList = [];
+        //this.$refs.uploader.allRemove();
+        this.fileData = {};
+        this.openUp = false;
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          id: null,
+          onepcHardwareNum: null,
+          apkUploadId: null,
+          logStatus: 0,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.queryParams.searchValue='';
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+    }
+  };
+</script>
+
+<style scoped lang="scss">
+  .apkfile {
+    display: flex!important;
+    flex-direction: column;
+    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+    padding:20px 20px 20px!important;
+    .button-box{
+      width:90px;
+      display: flex;
+      margin:0 auto;
+    }
+  }
+</style>
+<style lang="scss">
+  .dialog-up-data-box{
+    .text-box{
+      width:360px;
+      display: flex;
+      p:nth-child(1){
+        width:200px;
+        display:block;
+        overflow:hidden;
+        text-overflow:ellipsis;
+        white-space:nowrap;
+      }
+      p:nth-child(2){
+        width:100px;
+        text-align: center;
+      }
+      p:nth-child(3){
+        width:60px;
+        text-align: right;
+      }
+    }
+    .dialog-up-data-min-box{
+      height:500px;
+    }
+    .uploader-drop{
+      width:360px;
+      .el-icon-upload{
+        color:#0183FA;
+        display: block;
+        font-size:78px;
+        width:78px;
+        height:78px;
+        margin:0 auto;
+      }
+      .el-upload__text{
+        width:210px;
+        margin:0 auto;
+      }
+      .uploader-btn{
+        border:none;
+        color:#0183FA;
+      }
+    }
+    .uploader-files{
+      width:360px;
+    }
+  }
+</style>