zhuxinbo 5 سال پیش
والد
کامیت
a55a993a0d

+ 5 - 9
src/views/modules/appium/AppiumDeviceList.vue

@@ -14,7 +14,7 @@
               <a-input placeholder="请输入端口号" v-model="queryParam.port"></a-input>
             </a-form-item>
           </a-col>
-          <template v-if="toggleSearchStatus">
+          <template>
             <a-col :md="6" :sm="8">
               <a-form-item label="状态">
                 <!-- <a-input placeholder="请输入状态" v-model="queryParam.status"></a-input> -->
@@ -35,10 +35,6 @@
                 icon="reload"
                 style="margin-left: 8px"
               >重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-              </a>
             </span>
           </a-col>
         </a-row>
@@ -46,7 +42,7 @@
     </div>
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
+    <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('手机设备表')">导出</a-button>
       <a-upload
@@ -70,15 +66,15 @@
           <a-icon type="down" />
         </a-button>
       </a-dropdown>
-    </div>
+    </div> -->
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
         <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+      </div> -->
 
       <a-table
         ref="table"

+ 5 - 8
src/views/modules/appium/AppiumTaskItemList.vue

@@ -37,10 +37,7 @@
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
+
             </span>
           </a-col>
 
@@ -49,7 +46,7 @@
     </div>
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
+    <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</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">
@@ -61,14 +58,14 @@
         </a-menu>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
       </a-dropdown>
-    </div>
+    </div> -->
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+      </div> -->
 
       <a-table
         ref="table"

+ 24 - 35
src/views/modules/appium/AppiumTaskList.vue

@@ -14,7 +14,7 @@
               <a-input placeholder="请输入APP包名" v-model="queryParam.appPackage"></a-input>
             </a-form-item>
           </a-col>
-          <template v-if="toggleSearchStatus">
+          <template>
             <a-col :md="6" :sm="8">
               <a-form-item label="APP界面名">
                 <a-input placeholder="请输入APP界面名" v-model="queryParam.appActivity"></a-input>
@@ -24,16 +24,7 @@
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button
-                type="primary"
-                @click="searchReset"
-                icon="reload"
-                style="margin-left: 8px"
-              >重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-              </a>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
         </a-row>
@@ -42,7 +33,7 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>
       <a-upload
         name="file"
@@ -64,16 +55,16 @@
           批量操作
           <a-icon type="down" />
         </a-button>
-      </a-dropdown>
+      </a-dropdown> -->
     </div>
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
         <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+      </div> -->
 
       <a-table
         ref="table"
@@ -84,11 +75,11 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         @change="handleTableChange"
         @expand="expand"
       >
-        <span slot="action" slot-scope="text, record">
+        <!-- <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
@@ -108,7 +99,7 @@
               </a-menu-item>
             </a-menu>
           </a-dropdown>
-        </span>
+        </span> -->
         <a-table
           slot="expandedRowRender"
           slot-scope="text"
@@ -116,7 +107,7 @@
           :dataSource="text.innerData"
           :pagination="false"
         >
-          <span slot="action" slot-scope="text,record" class="table-operation">
+          <span slot="action" slot-scope="text, record" class="table-operation">
             <a href="javascript:;" @click="lookDetail(record)">查看</a>
           </span>
         </a-table>
@@ -134,11 +125,9 @@
         :filterOption="filterOption"
         v-model="value"
       >
-        <a-select-option
-          :value="item.id"
-          v-for="(item,index) of dataList"
-          :key="index"
-        >{{item.ip}}:{{item.port}}</a-select-option>
+        <a-select-option :value="item.id" v-for="(item, index) of dataList" :key="index"
+          >{{ item.ip }}:{{ item.port }}</a-select-option
+        >
       </a-select>
     </a-modal>
     <!-- 表单区域 -->
@@ -286,13 +275,13 @@ export default {
           title: 'APP界面名',
           align: 'center',
           dataIndex: 'appActivity'
-        },
-        {
-          title: '操作',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
         }
+        // {
+        //   title: '操作',
+        //   dataIndex: 'action',
+        //   align: 'center',
+        //   scopedSlots: { customRender: 'action' }
+        // }
       ],
       url: {
         list: '/appium/appiumTask/list',
@@ -331,10 +320,10 @@ export default {
             this.handleCancel()
           }
         })
-      }else{
-          this.visible = true
-          this.$message.error('请选择设备')
-          return
+      } else {
+        this.visible = true
+        this.$message.error('请选择设备')
+        return
       }
     },
     handleCancel() {
@@ -381,4 +370,4 @@ export default {
 .task-list tr.ant-table-expanded-row td > .ant-table-wrapper {
   margin: 0;
 }
-</style>
+</style>

+ 240 - 0
src/views/modules/appium/AppiumTaskListCan.vue

@@ -0,0 +1,240 @@
+<template>
+  <a-card :bordered="false" class="task-list">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="任务名称">
+              <a-input placeholder="请输入任务名称" v-model="queryParam.jobName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <!-- <a-input placeholder="请输入状态" v-model="queryParam.status"></a-input> -->
+              <a-select v-model="queryParam.status" allowClear>
+                <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>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+        @expand="expand"
+      >
+        <span slot="status" slot-scope="status">{{ status | showStatus }}</span>
+        <span slot="action" slot-scope="text, record">
+          <a @click="start(record)">开始执行</a>
+        </span>
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+    <a-modal title="执行设备" :visible="visible" @ok="handleOk" @cancel="handleCancel">
+      <!-- dataList -->
+      <a-form :form="form">
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="快手账号选择">
+          <a-select
+            v-decorator="[
+              'accountId', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '请选择快手账号选择!' }] }
+            ]"
+          >
+            <a-select-option :value="item.id" v-for="item of dataList" :key="item.id">
+              {{ item.accountName }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="创意名称">
+          <a-input
+            placeholder="请输入创意名称"
+            v-decorator="[
+              'creativeName', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '请输入创意名称!' }] }
+            ]"
+          />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="发布人名称">
+          <a-input
+            placeholder="请输入发布人名称"
+            v-decorator="[
+              'publishName', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '请输入发布人名称!' }] }
+            ]"
+          />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="执行次数">
+          <a-input-number
+            :min="1"
+            v-decorator="[
+              'num', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '请选择执行次数!' }] }
+            ]"
+          />
+        </a-form-item>
+      </a-form>
+    </a-modal>
+    <!-- 表单区域 -->
+    <appiumTask-modal ref="modalForm" @ok="modalFormOk"></appiumTask-modal>
+    <appiumTask-item-modal ref="modalItemForm" @ok="modalFormOk"></appiumTask-item-modal>
+  </a-card>
+</template>
+
+<script>
+import AppiumTaskModal from './modules/AppiumTaskModal'
+import AppiumTaskItemModal from './modules/AppiumTaskItemModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { getAction, postAction } from '@/api/manage'
+import { transformTozTreeFormat } from '@/utils/util.js'
+export default {
+  name: 'AppiumTaskList',
+  mixins: [JeecgListMixin],
+  components: {
+    AppiumTaskModal,
+    AppiumTaskItemModal
+  },
+  data() {
+    return {
+      description: '任务表管理页面',
+      // 表头
+      visible: false,
+      detail: null,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 6 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 18 }
+      },
+      columns: [
+        {
+          title: '任务名称',
+          align: 'center',
+          dataIndex: 'jobName'
+        },
+        {
+          title: '状态',
+          align: 'center',
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/ctop/appiumJob/list',
+        delete: '/appium/appiumTask/delete',
+        deleteBatch: '/appium/appiumTask/deleteBatch',
+        exportXlsUrl: 'appium/appiumTask/exportXls',
+        importExcelUrl: 'appium/appiumTask/importExcel'
+      },
+      run: '/appium/crawler/startJob',
+      appiumDevice: '/ctop/bindAccountLogin/list',
+      dataList: [],
+      value: null,
+      form: this.$form.createForm(this)
+    }
+  },
+  computed: {
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
+  },
+  filters: {
+    showStatus: function(value) {
+      var status = {
+        1: '可用',
+        2: '任务中',
+        3: '不可用'
+      }
+      return status[value]
+    }
+  },
+  methods: {
+    lookDetail(item) {
+      this.$refs.modalItemForm.edit(item)
+      this.$refs.modalItemForm.title = '编辑'
+      this.$refs.modalItemForm.disableSubmit = false
+    },
+    handleOk() {
+      this.form.validateFieldsAndScroll((err, values) => {
+        if (err) {
+          // 这里做逻辑处理
+        } else {
+          var params = values
+          console.log(params)
+          postAction(this.run, params).then(res => {
+            console.log(res)
+            this.visible = false
+          })
+        }
+      })
+    },
+    handleCancel() {
+      this.value = null
+      this.detail = null
+      this.visible = false
+    },
+    start(item) {
+      this.visible = true
+      this.detail = item
+      this.value = null
+      var param = {}
+      param.pageNo = 1
+      param.pageSize = 100
+      param.loginType = 'kuaishou'
+      getAction(this.appiumDevice, param).then(res => {
+        console.log(res.result.records)
+        if (res.code == 0) {
+          this.dataList = res.result.records
+        }
+      })
+    },
+    handleChange(value) {
+      //   this.value = value
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {})
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>
+<style>
+.task-list .ant-table-middle tr.ant-table-expanded-row td > .ant-table-wrapper {
+  margin: 0;
+}
+.task-list tr.ant-table-expanded-row td > .ant-table-wrapper {
+  margin: 0;
+}
+</style>

+ 1 - 1
src/views/modules/material/materialList.vue

@@ -555,7 +555,7 @@ a {
               :wrapper-col="{ span: 18 }"
               v-if="activeKey == 'video'"
             >
-              {{ detail.parameter.second }}
+              {{ detail.parameter.second }}
             </a-form-item>
             <a-form-item label="尺寸" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               {{ detail.parameter.width }}*{{ detail.parameter.height }}

+ 2 - 2
vue.config.js

@@ -65,8 +65,8 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         ws: false,
         changeOrigin: true