fangq 4 лет назад
Родитель
Сommit
d27a219bb9

BIN
public/favicon.png


BIN
public/img/logo.png


+ 85 - 30
src/views/ship/cable.vue

@@ -78,11 +78,31 @@
       </template>
 
       <template slot-scope="{row}" slot="menu" >
-        <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-view" @click="$refs.crudForm.rowView(row, row.$index)"> 查 看</el-button>
-        <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-edit" v-if="permission.cable_edit && row.status == 1" @click="$refs.crudForm.rowEdit(row, row.$index)"> 编 辑</el-button>
-        <el-button style="margin-left:10px;color: red" size="small" type="text" icon="el-icon-remove-outline" v-if="row.status == 1" @click="rowDisabled(row, true)">停用</el-button>
-        <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-document-checked" v-else @click="rowDisabled(row, false)">启用</el-button>
-        <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-paperclip" @click.native="bindTag(row)">标签绑定</el-button>
+
+        <el-dropdown trigger="click">
+          <span class="el-dropdown-link">
+            下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
+          </span>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>
+              <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-view" @click="$refs.crudForm.rowView(row, row.$index)"> 查 看</el-button>
+            </el-dropdown-item>
+            <el-dropdown-item>
+              <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-edit" v-if="permission.cable_edit && row.status == 1" @click="$refs.crudForm.rowEdit(row, row.$index)"> 编 辑</el-button>
+            </el-dropdown-item>
+            <el-dropdown-item>
+              <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-delete" @click="$refs.crudForm.rowDel(row, row.$index)"> 删 除</el-button>
+            </el-dropdown-item>
+            <el-dropdown-item>
+              <el-button style="margin-left:10px;color: red" size="small" type="text" icon="el-icon-remove-outline" v-if="row.status == 1" @click="rowDisabled(row, true)">停用</el-button>
+              <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-document-checked" v-else @click="rowDisabled(row, false)">启用</el-button>
+            </el-dropdown-item>
+            <el-dropdown-item>
+              <el-button style="margin-left:10px;" size="small" type="text" icon="el-icon-paperclip" @click.native="bindTag(row)">标签绑定</el-button>
+            </el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+
       </template>
     </avue-crud>
 
@@ -197,7 +217,7 @@
         },
         loading: true,
         page: {
-          pageSize: 10,
+          pageSize: 20,
           currentPage: 1,
           total: 0
         },
@@ -205,28 +225,44 @@
         option: {
           indexLabel: "序号",
           height:'auto',
+          menuWidth: 100,
           calcHeight: 30,
           tip: false,
-          searchShow: true,
+          searchBtn: false,
           searchMenuSpan: 6,
           border: true,
           index: true,
           viewBtn: false,
           editBtn: false,
           addBtn: false,
+          delBtn: false,
           selection: true,
+          searchShow: false,
           dialogClickModal: false,
           searchSize: "mini",
           align: "center",
           column: [
             {
-              label: "号",
+              label: "产品编号",
               prop: "shipNo",
               search: true,
               searchSpan: 4,
+              tip: true,
+              rules: [{
+                required: true,
+                message: "请输入产品编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "标签",
+              prop: "label",
+              addDisplay: false,
+              editDisplay: false,
+              tip: "true",
               rules: [{
                 required: true,
-                message: "请输入船号",
+                message: "请输入标签",
                 trigger: "blur"
               }]
             },
@@ -244,6 +280,7 @@
             {
               label: "电缆代号",
               prop: "alias",
+              tip: '水电费',
               search: true,
               searchSpan: 4,
               rules: [{
@@ -256,6 +293,7 @@
               label: "类别",
               prop: "category",
               type: "select",
+              overHidden: true,
               dicUrl: `/api/blade-system/dict/dictionary?code=cable_category`,
               props: {
                 label: "dictValue",
@@ -333,6 +371,7 @@
                 {
                   label: "舱室",
                   prop: "beginCabin",
+                  overHidden: true,
                   type: "select",
                   dicUrl: `/api/blade-system/dict/dictionary?code=ship_cabin`,
                   props: {
@@ -346,11 +385,11 @@
                   }]
                 },
                 {
-                  label: "设备名称",
+                  label: "终端名称",
                   prop: "beginName",
                   rules: [{
                     required: true,
-                    message: "请输入设备名称",
+                    message: "请输入终端名称",
                     trigger: "blur"
                   }]
                 },
@@ -406,6 +445,7 @@
                   label: "舱室",
                   prop: "endCabin",
                   type: "select",
+                  overHidden: true,
                   dicUrl: `/api/blade-system/dict/dictionary?code=ship_cabin`,
                   props: {
                     label: "dictValue",
@@ -418,11 +458,11 @@
                   }]
                 },
                 {
-                  label: "设备名称",
+                  label: "终端名称",
                   prop: "endName",
                   rules: [{
                     required: true,
-                    message: "请输入设备名称",
+                    message: "请输入终端名称",
                     trigger: "blur"
                   }]
                 },
@@ -507,26 +547,18 @@
             {
               label: "备注",
               prop: "remark",
+              hide: true,
               rules: [{
                 required: false,
                 message: "请输入备注",
                 trigger: "blur"
               }]
             },
-            {
-              label: "标签",
-              prop: "label",
-              addDisplay: false,
-              editDisplay: false,
-              rules: [{
-                required: true,
-                message: "请输入标签",
-                trigger: "blur"
-              }]
-            },
             {
               label: "创建时间",
               prop: "createTime",
+              overHidden: true,
+
               type: "datetime",
               format: "yyyy-MM-dd HH:mm:ss",
               valueFormat: "yyyy-MM-dd HH:mm:ss",
@@ -542,15 +574,16 @@
         },
         optionForm: {
           tabs: true,
+          updateBtnText:'保存',
           column: [
             {
-              label: "号",
+              label: "产品编号",
               prop: "shipNo",
               search: true,
               searchSpan: 4,
               rules: [{
                 required: true,
-                message: "请输入号",
+                message: "请输入产品编号",
                 trigger: "blur"
               }]
             },
@@ -702,11 +735,11 @@
                   }]
                 },
                 {
-                  label: "设备名称",
+                  label: "终端名称",
                   prop: "beginName",
                   rules: [{
                     required: true,
-                    message: "请输入设备名称",
+                    message: "请输入终端名称",
                     trigger: "blur"
                   }]
                 },
@@ -778,11 +811,11 @@
                   }]
                 },
                 {
-                  label: "设备名称",
+                  label: "终端名称",
                   prop: "endName",
                   rules: [{
                     required: true,
-                    message: "请输入设备名称",
+                    message: "请输入终端名称",
                     trigger: "blur"
                   }]
                 },
@@ -931,6 +964,14 @@
         }
       },
     },
+    mounted() {
+      let alias = this.$route.query.alias;
+      if (alias){
+        // this.$refs.crud.searchForm.alias = alias;
+        this.query.alias = alias;
+        this.onLoad(this.page);
+      }
+    },
     methods: {
       bindTag(row){
         let _this = this;
@@ -1113,4 +1154,18 @@
 </script>
 
 <style>
+  .el-dropdown-link {
+    cursor: pointer;
+    color: #409EFF;
+  }
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+  .el-dropdown-menu li {
+    padding: 0px !important;
+    margin:  0px 5px !important;
+  }
+  .el-dropdown-menu button {
+    margin-left: 0px !important;
+  }
 </style>

+ 10 - 6
src/views/ship/device.vue

@@ -89,31 +89,35 @@
           viewBtn: true,
           selection: true,
           dialogClickModal: false,
+          align: "center",
           column: [
             {
-              label: "设备名称",
+              label: "终端名称",
               prop: "name",
+              search: true,
               rules: [{
                 required: true,
-                message: "请输入设备名称",
+                message: "请输入终端名称",
                 trigger: "blur"
               }]
             },
             {
-              label: "设备编码",
+              label: "终端编码",
               prop: "code",
+              search: true,
               rules: [{
                 required: true,
-                message: "请输入设备编码",
+                message: "请输入终端编码",
                 trigger: "blur"
               }]
             },
             {
-              label: "设备型号",
+              label: "终端型号",
               prop: "model",
+              search: true,
               rules: [{
                 required: true,
-                message: "请输入设备型号",
+                message: "请输入终端型号",
                 trigger: "blur"
               }]
             },

+ 404 - 160
src/views/ship/ship.vue

@@ -1,191 +1,435 @@
 <template>
-  <basic-container>
+  <div class="broadcastList">
+    <div class="broadPaning">
+      <div class="broadPaning-body">
+        <!-- 直播列表 -->
+        <template v-else>
+          <div class="table-item"
+               v-for="(item,index) in liveroomList"
+               :key="index">
+            <div class="headItemp5">
+              <el-link type="primary" @click="showWheeldrawBtn(item)">
+                大转盘
+              </el-link>
+              <span style="width: 0.625rem;">&nbsp;</span>
+              <el-link type="info">
+                分享有奖
+              </el-link>
+            </div>
+          </div>
+        </template>
+      </div>
+    </div>
 
-  </basic-container>
+    <!-- 大转盘 -->
+    <Modal width="70%" v-model="wheeldrawmodel" title="大转盘" @on-ok="wheeldrawok" @on-cancel="wheeldrawcancel">
+      <div style="height:25rem;width:100%;overflow-y: auto;">
+        <Form ref="wheeldrawformItem" :model="wheeldrawformItem" :rules="ruleInline" :label-width="80">
+          <Form-item class="wheeldraw-dialog-width" label="名称" prop="name">
+            <Input v-model="wheeldrawformItem.name" placeholder="请输入"></Input>
+          </Form-item>
+          <Form-item class="wheeldraw-dialog-width" label="直播间">
+            <span>{{ broadcastDetailData.name }}</span>
+          </Form-item>
+          <Form-item class="wheeldraw-dialog-width" required label="城市" prop="city" v-if="roleName == '全部权限' || roleName == '省公司'">
+            <Cascader :data="Citydata"
+                      trigger="hover"
+                      placeholder="请选择地址"
+                      v-model="wheeldrawformItem.city"></Cascader>
+          </Form-item>
+          <Form-item class="wheeldraw-dialog-width" required label="城市" prop="city" v-else>
+            <Input v-model="roleName" :disabled="disabled"></Input>
+          </Form-item>
+          <Form-item class="wheeldraw-dialog-width" label="是否开启">
+            <i-switch v-model="wheeldrawformItem.switch" @on-change="wheeldrawswitchchange"></i-switch>
+          </Form-item>
+          <Form-item class="wheeldraw-dialog-width" required label="奖项" prop="prize">
+            <div v-show="wheelPrizelist.length <= 0">
+              <Row v-for="tag, index in dynamicTags" :key="index" style="margin-bottom: 0.625rem;">
+                <Col span="10">
+                  <span>序号{{ index+1 }}</span>
+                  <Select style="width:80%;" @on-change="prizeSelect">
+                    <Option v-for="item in prizeList" :value="item.id">
+                      {{ item.name }}
+                    </Option>
+                    <Page :total="prizeTotalPage"
+                          size="small"
+                          :page-size="prizePageSize"
+                          :current="prizeCurrentPage"
+                          @on-change="handlePageName"
+                          style="text-align: right;"
+                    />
+                  </Select>
+                </Col>
+                <Col span="6">
+                  <span>个数</span>
+                  <Input-number :min="1" style="width: 80%;" @on-change="handlePrizeNum"></Input-number>
+                </Col>
+                <Col span="6">
+                  <span>概率</span>
+                  <Input-number :min="1" style="width: 30%;" @on-change="handlePrizeGL1"></Input-number>
+                  / 100
+                  <!-- <Input-number :min="1" style="width: 30%;" @on-change="handlePrizeGL2"></Input-number> -->
+                </Col>
+                <Col span="1" v-if="(index+1) == dynamicTags">
+                  <Button type="text" @click="showInput">
+                    <Icon type="plus"></Icon>
+                  </Button>
+                </Col>
+                <Col span="1" v-show="dynamicTags > 1">
+                  <Button type="text" @click="reducePrizeOption((index))">
+                    <Icon type="minus"></Icon>
+                  </Button>
+                </Col>
+              </Row>
+            </div>
+            <div v-show="wheelPrizelist.length > 0">
+              <Row v-for="tag, index in wheelPrizelist" :key="index" style="margin-bottom: 0.625rem;">
+                <Col span="10">
+                  <span>序号{{ index+1 }}</span>
+                  <Select style="width:80%;" @on-change="prizeSelect">
+                    <Option v-for="item in prizeList" :value="item.id">
+                      {{ item.name }}
+                      <!-- {{ tag.prizename }} -->
+                    </Option>
+                    <Page :total="prizeTotalPage"
+                          size="small"
+                          :page-size="prizePageSize"
+                          :current="prizeCurrentPage"
+                          @on-change="handlePageName"
+                          style="text-align: right;"
+                    />
+                  </Select>
+                </Col>
+                <Col span="6">
+                  <span>个数</span>
+                  <Input-number :min="1" style="width: 80%;" v-model="tag.prizenum" @on-change="handlePrizeNum"></Input-number>
+                </Col>
+                <Col span="6">
+                  <span>概率</span>
+                  <Input-number :min="1" style="width: 30%;" v-model="tag.lotteryprobability1" @on-change="handlePrizeGL1"></Input-number>
+                  / 100
+                  <!-- <Input-number :min="1" style="width: 30%;" @on-change="handlePrizeGL2"></Input-number> -->
+                </Col>
+                <Col span="1" v-if="(index+1) == wheelPrizelist.length">
+                  <Button type="text" @click="showInput">
+                    <Icon type="plus"></Icon>
+                  </Button>
+                </Col>
+                <Col span="1" v-show="wheelPrizelist.length > 1">
+                  <Button type="text" @click="reducePrizeOption((index))">
+                    <Icon type="minus"></Icon>
+                  </Button>
+                </Col>
+              </Row>
+            </div>
+
+            <div style="margin-top: 1.25rem;text-align: center;">
+              <Button type="error" @click="clearBothPrize">清除所有奖项</Button>
+            </div>
+          </Form-item>
+        </Form>
+      </div>
+    </Modal>
+
+  </div>
 </template>
 
 <script>
-  import {getList as getListShip, getDetail as getDetailShip, add as addShip, update as updateShip, remove as removeShip} from "@/api/ship/ship";
-  import {mapGetters} from "vuex";
-
   export default {
-    data() {
+    name: "broadcastList",
+    data () {
       return {
-        formShip: {},
-        queryShip: {},
-        loadingShip: true,
-        pageShip: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
+        searchName: '',
+        modal1: false,
+        modal2: false,
+        modal3: false,
+        modal4: false,
+        liveroomList: [],
+        cityChecks: [],
+        Citydata: [],
+        pushAddr: "",
+        province: "", // 省
+        city: "",     // 市
+        country: "",  // 区
+        pageTotal: 100,
+        pageSize: 10,
+        pageCurrent: 1,
+        deleconfimStatus: false,
+        visible: false,
+        roleName: '',
+        showChooseAddress: false,
+        loginCity: '',
+        wheeldrawmodel: false,
+        wheeldrawformItem: {
+          name: '',
+          city: [],
+          switch: false,
+          prize: '',
+          prizenum: 1,
+          prizecode: '',
+          prizelevel: '',
+          lotteryprobability1: 1,
+          lotteryprobability2: 1,
+          prizechance: ''
         },
-        selectionListShip: [],
-        optionShip: {
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "编号",
-              prop: "code",
-              rules: [{
-                required: true,
-                message: "请输入编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "名称",
-              prop: "name",
-              rules: [{
-                required: true,
-                message: "请输入名称",
-                trigger: "blur"
-              }]
-            },
-          ]
+        broadcastDetailData: '',
+        disabled: true,
+        prize1List: [
+          {
+            value: 'yidengjiang',
+            label: '一等奖'
+          },
+          {
+            value: 'erdengjiang',
+            label: '二等奖'
+          }
+        ],
+        inputVisible: false,
+        inputValue: '',
+        dynamicTags: 1,
+        showReduceIcon: false,
+        ruleInline: {
+          name: [
+            { required: true, message: '名称必填', trigger: 'blur' }
+          ],
+          // code: [
+          // 	{ required: true, message: '奖项编码必填', trigger: 'blur' }
+          // ],
+          // city: [
+          // 	{ required: true, message: '直播地区必填', trigger: 'blur' }
+          // ],
+          // level: [
+          // 	{ required: true, message: '奖项等级必填', trigger: 'blur' }
+          // ]
         },
-        dataShip: []
-      };
+        prizeTotalPage: 100,
+        prizePageSize: 10,
+        prizeCurrentPage: 1,
+        prizeList: [],
+        prizeItemData: '',
+        wheelPrizelist: [],
+        showdeleteflag: false
+      }
+    },
+    components: {
     },
     computed: {
-      ...mapGetters(["permission"]),
-      permissionListShip() {
-        return {
-          addBtn: this.vaildData(this.permission.ship_add, false),
-          viewBtn: this.vaildData(this.permission.ship_view, false),
-          delBtn: this.vaildData(this.permission.ship_delete, false),
-          editBtn: this.vaildData(this.permission.ship_edit, false)
-        };
-      },
-      idsShip() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
     },
+    watch: {},
+    created () {
+
+    },
+    mounted () { },
     methods: {
-      rowSaveShip(row, done, loading) {
-        addShip(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
-        });
-      },
-      rowUpdateShip(row, index, done, loading) {
-        updateShip(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
-        });
+
+      showWheeldrawBtn(item) {
+        const that = this
+        that.wheeldrawmodel = true
+        that.broadcastDetailData = item
+        that.getPrizeList()
       },
-      rowDelShip(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeShip(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
+
+      showInput() {
+        let tempArr = new Array();
+        tempArr = this.wheelPrizelist;
+        let tmpprize = {}
+        tmpprize.index = this.dynamicTags
+        tmpprize.prizeid = this.prizeItemData.id
+        tmpprize.prizename = this.prizeItemData.name
+        tmpprize.prizecode = this.prizeItemData.code
+        tmpprize.prizelevel = this.prizeItemData.level
+        tmpprize.prizenum = this.wheeldrawformItem.prizenum
+        tmpprize.lotteryprobability1 = this.wheeldrawformItem.lotteryprobability1
+        tmpprize.lotteryprobability2 = 100
+        tmpprize.roomid = this.broadcastDetailData.room_id
+        tmpprize.sort = 1
+        // console.log(tmpprize)
+        tempArr.push(tmpprize);
+        this.wheelPrizelist = tempArr;
+        console.log(this.wheelPrizelist)
+        this.dynamicTags++;
+        // this.prizeItemData.id = ''
+        // this.prizeItemData.name = ''
+        // this.prizeItemData.code = ''
+        // this.prizeItemData.level = ''
+        // this.wheeldrawformItem.prizenum = 1
+        // this.wheeldrawformItem.lotteryprobability1 = 1
+        // this.wheeldrawformItem.lotteryprobability2 = 1
       },
-      handleDeleteShip() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
+
+      reducePrizeOption(listindex) {
+        if(this.dynamicTags.length == this.wheelPrizelist) {
+
+        } else {
+          let tempArr = new Array();
+          tempArr = this.wheelPrizelist;
+          let tmpprize = {}
+          tmpprize.index = this.dynamicTags
+          tmpprize.prizeid = this.prizeItemData.id
+          tmpprize.prizename = this.prizeItemData.name
+          tmpprize.prizecode = this.prizeItemData.code
+          tmpprize.prizelevel = this.prizeItemData.level
+          tmpprize.prizenum = this.wheeldrawformItem.prizenum
+          tmpprize.lotteryprobability1 = this.wheeldrawformItem.lotteryprobability1
+          tmpprize.lotteryprobability2 = 100
+          tmpprize.roomid = this.broadcastDetailData.room_id
+          tmpprize.sort = 1
+          tempArr.push(tmpprize);
+          this.wheelPrizelist = tempArr;
         }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+        console.log(this.wheeldrawformItem.prizenum)
+        // console.log(listindex)
+        // console.log(this.wheelPrizelist)
+        this.wheelPrizelist.map((item,index,arr) => {
+          if (item.index == (listindex+1)) {
+            this.wheelPrizelist.splice(listindex, 1)
+          }
+          return;
         })
-          .then(() => {
-            return removeShip(this.ids);
-          })
-          .then(() => {
-            this.onLoadShip(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crudShip.toggleSelection();
-          });
+
+        this.dynamicTags--;
       },
-      beforeOpenShip(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetailShip(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
+
+      clearBothPrize() {
+        // this.dynamicTags = 1
+        // this.wheelPrizelist = []
+        // tmpprize.prizeid = this.prizeItemData.id
+        // tmpprize.prizename = this.prizeItemData.name
+        // tmpprize.prizecode = this.prizeItemData.code
+        // tmpprize.prizelevel = this.prizeItemData.level
+        // this.prizeItemData = ''
+        // this.wheeldrawformItem.prizenum = 1
+        // this.wheeldrawformItem.lotteryprobability1 = 1
+        // this.wheeldrawformItem.lotteryprobability2 = 1
       },
-      searchResetShip() {
-        this.query = {};
-        this.onLoadShip(this.page);
+
+      wheeldrawswitchchange(status) {
+        this.wheeldrawformItem.switch = status
+        // this.$Message.info('开关状态:' + status);
       },
-      searchChangeShip(params, done) {
-        this.queryShip = params;
-        this.pageShip.currentPage = 1;
-        this.onLoadShip(this.pageShip, params);
-        done();
+
+      getPrizeList() {
+        const tmpdata = {
+          "pageNo": this.prizeCurrentPage,
+          "pageSize": this.prizePageSize,
+          "city": this.city
+        }
+        this.$http.post("/live/wheel/prize/getByCity", this.common.request(tmpdata)).then(response => {
+          if (response.data.body.status.statusCode == 0) {
+            let data = response.data.body.data
+            if (data.list) {
+              this.prizeList = data.list
+              this.prizeTotalPage = data.totalNum;
+            }
+          } else {
+            this.$Message.error(response.data.body.status.errorDesc);
+          }
+        }, response => {
+          this.$Message.error(response.data.body.status.errorDesc);
+        });
       },
-      selectionChangeShip(list) {
-        this.selectionListShip = list;
+
+      handlePageName(e) {
+        this.prizeCurrentPage = e
       },
-      selectionClearShip() {
-        this.selectionListShip = [];
-        this.$refs.crudShip.toggleSelection();
+
+      prizeSelect(value) {
+        const that = this
+        let tmpprizeitem = ''
+        that.prizeList.map((item,index,arr)=>{
+          if (item.id == value) {
+            tmpprizeitem = item
+            return
+          }
+        })
+        that.prizeItemData = tmpprizeitem
+        // console.log(that.prizeItemData)
+        // console.log(tmpprizeitem)
+        // this.wheeldrawformItem.prizecode = value
       },
-      currentChangeShip(currentPage){
-        this.pageShip.currentPage = currentPage;
+
+      handlePrizeNum(value) {
+        // console.log(value)
+        this.wheeldrawformItem.prizenum = value
+      },
+
+      handlePrizeGL1(value) {
+        // console.log(value)
+        this.wheeldrawformItem.lotteryprobability1 = value
       },
-      sizeChangeShip(pageSize){
-        this.pageShip.pageSize = pageSize;
+
+      handlePrizeGL2(value) {
+        // console.log(value)
+        this.wheeldrawformItem.lotteryprobability2 = value
+        // let tempArr = new Array();
+        //  tempArr = this.wheelPrizelist;
+        //  let tmpprize = {}
+        //  tmpprize.prizeid = this.prizeItemData.id
+        //  tmpprize.prizename = this.prizeItemData.name
+        //  tmpprize.prizecode = this.prizeItemData.code
+        //  tmpprize.prizelevel = this.prizeItemData.level
+        //  tmpprize.prizenum = this.wheeldrawformItem.prizenum
+        //  tmpprize.lotteryprobability1 = this.wheeldrawformItem.lotteryprobability1
+        //  tmpprize.lotteryprobability2 = this.wheeldrawformItem.lotteryprobability2
+        //  tmpprize.roomid = this.broadcastDetailData.room_id
+        //  tmpprize.sort = 1
+        //  // console.log(tmpprize)
+        //  tempArr.push(tmpprize);
+        //  this.wheelPrizelist = tempArr;
+        //  console.log(this.wheelPrizelist)
       },
-      refreshChangeShip() {
-        this.onLoadShip(this.pageShip, this.queryShip);
+
+      wheeldrawok() {
+        // console.log(this.$refs.kkk.querySelector('.inputnum'))
+        // let tmpwheelprizelist = []
+        // console.log(this.wheelPrizelist)
+        if(this.dynamicTags.length == this.wheelPrizelist) {
+
+        } else {
+          let tempArr = new Array();
+          tempArr = this.wheelPrizelist;
+          let tmpprize = {}
+          tmpprize.index = this.dynamicTags
+          tmpprize.prizeid = this.prizeItemData.id
+          tmpprize.prizename = this.prizeItemData.name
+          tmpprize.prizecode = this.prizeItemData.code
+          tmpprize.prizelevel = this.prizeItemData.level
+          tmpprize.prizenum = this.wheeldrawformItem.prizenum
+          tmpprize.lotteryprobability1 = this.wheeldrawformItem.lotteryprobability1
+          tmpprize.lotteryprobability2 = 100
+          tmpprize.roomid = this.broadcastDetailData.room_id
+          tmpprize.sort = 1
+          console.log(tmpprize)
+          tempArr.push(tmpprize);
+          this.wheelPrizelist = tempArr;
+          console.log(this.wheelPrizelist)
+        }
+
+
+        // let tmpprize = {}
+        // tmpprize.prizeid = this.prizeItemData.id
+        // tmpprize.prizename = this.prizeItemData.name
+        // tmpprize.prizecode = this.prizeItemData.code
+        // tmpprize.prizelevel = this.prizeItemData.level
+        // tmpprize.prizenum = this.wheeldrawformItem.prizenum
+        // tmpprize.lotteryprobability1 = this.wheeldrawformItem.lotteryprobability1
+        // tmpprize.lotteryprobability2 = this.wheeldrawformItem.lotteryprobability2
+        // tmpprize.roomid = this.broadcastDetailData.room_id
+        // tmpprize.sort = 1
+        // console.log(tmpprize)
+        // this.wheelPrizelist.push(tmpprize)
+        // console.log(this.wheelPrizelist)
       },
-      onLoadShip(page, params = {}) {
-        this.loadingShip = true;
-        getListShip(page.currentPage, page.pageSize, Object.assign(params, this.queryShip)).then(res => {
-          const data = res.data.data;
-          this.pageShip.total = data.total;
-          this.dataShip = data.records;
-          this.loadingShip = false;
-          this.selectionClearShip();
-        });
+
+      wheeldrawcancel() {
+
       }
+
     }
-  };
+  }
 </script>
 
-<style>
+<style lang='less'>
+
 </style>

+ 10 - 2
src/views/ship/shipyard.vue

@@ -32,6 +32,7 @@
           </template>
         </avue-crud>
       </el-col>
+
       <el-col :span="12">
         <avue-crud :option="optionShip"
                    :table-loading="loadingShip"
@@ -93,24 +94,28 @@
           tip: false,
           searchShow: true,
           searchMenuSpan: 6,
+          searchSpan: 12,
           border: true,
           index: true,
           viewBtn: true,
           selection: true,
           dialogClickModal: false,
+          align: "center",
           column: [
-            {
+            /*{
               label: "船厂编号",
               prop: "code",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入船厂编号",
                 trigger: "blur"
               }]
-            },
+            },*/
             {
               label: "船厂名称",
               prop: "name",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入船厂名称",
@@ -140,11 +145,13 @@
           tip: false,
           searchShow: true,
           searchMenuSpan: 6,
+          searchSpan: 12,
           border: true,
           index: true,
           viewBtn: true,
           selection: true,
           dialogClickModal: false,
+          align: "center",
           column: [
             {
               label: "船只编号",
@@ -158,6 +165,7 @@
             {
               label: "船只名称",
               prop: "name",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入船只名称",

+ 29 - 8
src/views/wel/index.vue

@@ -3,6 +3,9 @@
     <el-col :span="24">
       <basic-container>
         <avue-data-panel :option="optionTotal"></avue-data-panel>
+        <div style="width: 500px;position: fixed;right: 70px;top: 160px;">
+          <avue-form :option="quickOption" v-model="quickForm"></avue-form>
+        </div>
       </basic-container>
     </el-col>
 
@@ -51,6 +54,25 @@
     name: "wel",
     data() {
       return {
+
+        quickOption: {
+          // labelWidth: 120,
+          emptyBtn: false,
+          submitBtn : false,
+          column: [
+            {
+              label: '搜索内容',
+              prop: 'search',
+              type: 'search',
+              span: 24,
+              appendClick:()=>{
+                this.$router.push({path: "/ship/cable?alias=" + this.quickForm.search});
+              }
+            }
+          ]
+        },
+        quickForm: {},
+
         optionTotal: {
           span: 4,
           data: [
@@ -60,7 +82,7 @@
               },
               title: '操作员总数',
               count: 0,
-              icon: 'el-icon-s-home',
+              icon: 'el-icon-user-solid',
               color: '#00a7d0',
             },
             {
@@ -69,16 +91,16 @@
               },
               title: '电缆总数',
               count: 0,
-              icon: 'el-icon-s-shop',
+              icon: 'el-icon-set-up',
               color: 'rgb(27, 201, 142)',
             },
             {
               click: () => {
                 this.$router.push({path: "/ship/device"});
               },
-              title: '设备总数',
+              title: '终端总数',
+              icon: 'el-icon-mobile-phone',
               count: 0,
-              icon: 'el-icon-user-solid',
               color: '#5555ff',
             },
           ]
@@ -105,7 +127,7 @@
                 this.$router.push({path: "/ship/device"});
               },
               count: 0,
-              title: '新增设备',
+              title: '新增终端',
             },
 
           ]
@@ -129,7 +151,7 @@
                 ['trend'],
                 ['操作员新增'],
                 ['电缆新增'],
-                ['设备新增'],
+                ['终端新增'],
               ],
               path: ["/system/user", "/ship/cable", "/ship/device"]
             },
@@ -242,7 +264,6 @@
     methods: {
       initLabelBind(){
         getCableList().then(res => {
-          debugger
           const data = res.data.data;
           let binded = 0 ,unbind = 0;
           for (let i = 0; i < data.length; i++) {
@@ -321,7 +342,7 @@
             //添加商户新增
             this.setAddTrend(data.cableList, date, "电缆新增");
             //添加代理新增
-            this.setAddTrend(data.deviceList, date, "设备新增");
+            this.setAddTrend(data.deviceList, date, "终端新增");
 
             //加上一天
             time.add(1, 'days');