Browse Source

增加发起投放组件

Young 2 years ago
parent
commit
d2f9d7535a
2 changed files with 283 additions and 290 deletions
  1. 139 101
      src/views/put/PutDetails.vue
  2. 144 189
      src/views/put/modules/CreateForm.vue

+ 139 - 101
src/views/put/PutDetails.vue

@@ -1,113 +1,137 @@
 <template>
-  <a-row>
-    <a-col :span="6">
-      <div style="width: 200px">
-        <div class="flex flex-col justify-center" style="margin-bottom: 10px">
-          <div class="text-center">
-            <a-avatar :size="80" :src="this.authorInfo.avatar">央</a-avatar>
-          </div>
-          <div class="username text-center">{{ this.authorInfo.videoAccountName }}</div>
-        </div>
-        <div class="flex justify-around text-center" style="margin-bottom: 5px">
-          <div>
-            <div>粉丝数</div>
-            <div class="num"><span>{{ this.authorInfo.fansCount }}</span></div>
-          </div>
-          <div>
-            <div>发表数</div>
-            <div class="num">{{ this.authorInfo.sendVideoCount }}</div>
-          </div>
-        </div>
-        <div class="flex justify-around text-center" style="margin-bottom: 5px">
-          <div>
-            <div>投放条数</div>
-            <div class="num">{{ this.authorInfo.putCount }}</div>
-          </div>
-          <div>
-            <div>投放量级</div>
-            <div class="num">{{ this.authorInfo.putLevelCount }}</div>
-          </div>
-        </div>
-
-      </div>
-    </a-col>
-    <a-col :span="18" style=" background: #fff">
-      <div class="flex" style="padding: 10px;">
-
-        <div style="margin-right: 20px">
-          <span>发表时间:</span>
-          <a-range-picker show-time @change="handleChangePicker">
-          </a-range-picker>
-
-        </div>
-        <div class="flex">
-          <a-input v-model="formData.searchValue" placeholder="请输入作者 finderUin"></a-input>
-          <a-button style="margin-left: 10px;" type="primary" @click="handleClickSearch">搜索</a-button>
-        </div>
-
-      </div>
-      <div style="margin-top: 10px; font-size: 14px; background: #eff2f5">
-        <template v-for="(item, index) of tableList" :key-="index">
-          <a-row style="background: white; margin-bottom: 20px; padding: 10px;">
-
-            <a-col :span="12" style="padding-right: 20px;">
-              <div style="margin-bottom: 5px">{{ item.desc }}</div>
-              <div>{{ item.sendTimeStr }}</div>
-              <a-row>
-                <a-col :span="12">有效曝光次数:{{ item.exposureCount }}</a-col>
-                <a-col :span="12">投放量级:{{ item.putCountLevel }}</a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">点赞次数:{{ item.likeCount }}</a-col>
-                <a-col :span="12">投放标签:</a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">完播次数:{{ item.playCount }}</a-col>
-                <a-col :span="12">投放年龄:</a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">关注次数:{{ item.followCount }}</a-col>
-                <a-col :span="12">投放城市:</a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">收藏次数:{{ item.collectCount }}</a-col>
-                <a-col :span="12">投放性别:</a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">评论次数:{{ item.commentCount }}</a-col>
-                <a-col :span="12">投放人:</a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">点赞率:{{ item.playCount / item.likeCount }}%</a-col>
-                <a-col :span="12"></a-col>
-              </a-row>
-              <a-row>
-                <a-col :span="12">关注率:{{ item.playCount / item.followCount }}%</a-col>
-                <a-col :span="12"></a-col>
-              </a-row>
-
-              <div style="font-size: 12px; color: #aaa; margin-top: 30px">feedid:{{ item.feedId }}</div>
-            </a-col>
-            <a-col :span="12">
+  <div class="app-container">
+    <a-card :bordered="false">
+      <a-row>
+        <a-col :span="6">
+          <div style="width: 200px">
+            <div class="flex flex-col justify-center" style="margin-bottom: 10px">
+              <div class="text-center">
+                <a-avatar :size="80" :src="this.authorInfo.avatar">央</a-avatar>
+              </div>
+              <div class="username text-center">{{ this.authorInfo.videoAccountName }}</div>
+            </div>
+            <div class="flex justify-around text-center" style="margin-bottom: 5px">
+              <div>
+                <div>粉丝数</div>
+                <div class="num"><span>{{ this.authorInfo.fansCount }}</span></div>
+              </div>
               <div>
-                <video :src="item.link" style="width: 100%" controls></video>
-                <div>
-                  <a-button type="primary" ghost @click="handleClickPush(item)">投放</a-button>
-                </div>
+                <div>发表数</div>
+                <div class="num">{{ this.authorInfo.sendVideoCount }}</div>
               </div>
-            </a-col>
-          </a-row>
-        </template>
-      </div>
-    </a-col>
-  </a-row>
+            </div>
+            <div class="flex justify-around text-center" style="margin-bottom: 5px">
+              <div>
+                <div>投放条数</div>
+                <div class="num">{{ this.authorInfo.putCount }}</div>
+              </div>
+              <div>
+                <div>投放量级</div>
+                <div class="num">{{ this.authorInfo.putLevelCount }}</div>
+              </div>
+            </div>
+
+          </div>
+        </a-col>
+        <a-col :span="18" style=" background: #fff">
+          <div class="flex" style="padding: 10px;">
+
+            <div style="margin-right: 20px">
+              <span>发表时间:</span>
+              <a-range-picker show-time @change="handleChangePicker">
+              </a-range-picker>
+
+            </div>
+            <div class="flex">
+              <a-input v-model="formData.searchValue" placeholder="请输入作者 finderUin"></a-input>
+              <a-button style="margin-left: 10px;" type="primary" @click="handleClickSearch">搜索</a-button>
+            </div>
 
+          </div>
+          <div style="margin-top: 10px; font-size: 14px; background: #eff2f5">
+            <template v-for="(item, index) of tableList" :key-="index">
+              <a-row style="background: white; margin-bottom: 20px; padding: 10px;">
+
+                <a-col :span="12" style="padding-right: 20px;">
+                  <div style="margin-bottom: 5px">{{ item.desc }}</div>
+                  <div>{{ item.sendTimeStr }}</div>
+                  <a-row>
+                    <a-col :span="12">有效曝光次数:{{ item.exposureCount }}</a-col>
+                    <a-col :span="12">投放量级:{{ item.putCountLevel }}</a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">点赞次数:{{ item.likeCount }}</a-col>
+                    <a-col :span="12">投放标签:</a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">完播次数:{{ item.playCount }}</a-col>
+                    <a-col :span="12">投放年龄:</a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">关注次数:{{ item.followCount }}</a-col>
+                    <a-col :span="12">投放城市:</a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">收藏次数:{{ item.collectCount }}</a-col>
+                    <a-col :span="12">投放性别:</a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">评论次数:{{ item.commentCount }}</a-col>
+                    <a-col :span="12">投放人:</a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">点赞率:{{ item.playCount / item.likeCount }}%</a-col>
+                    <a-col :span="12"></a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="12">关注率:{{ item.playCount / item.followCount }}%</a-col>
+                    <a-col :span="12"></a-col>
+                  </a-row>
+
+                  <div style="font-size: 12px; color: #aaa; margin-top: 30px">feedid:{{ item.feedId }}</div>
+                </a-col>
+                <a-col :span="12">
+                  <div>
+                    <video :src="item.link" style="width: 100%" controls></video>
+<!--                    <div>-->
+<!--                      <a-button type="primary" ghost @click="handleClickPush(item)">投放</a-button>-->
+<!--                    </div>-->
+                    <div class="table-operator">
+                      <a-button type="primary" icon="plus" @click="createHandler(item)">投放</a-button>
+                    </div>
+                  </div>
+                </a-col>
+              </a-row>
+            </template>
+          </div>
+        </a-col>
+
+        <CreatePutForm
+          :formType="formType"
+          :visible="visible"
+          ref="createForm"
+          @resetData="resetData"
+          @refreshTable="refreshTable"
+        />
+      </a-row>
+    </a-card>
+  </div>
 </template>
 
 <script>
+
 import { fetchVideoList, fetchAuthorByFinderUin, saveAuthorVideo } from '@/api/author'
+import CreatePutForm from './modules/CreateForm'
+import { Ellipsis, STable } from '@/components'
+import SearchForm from './modules/SearchForm'
 
 export default {
+  components: {
+    STable,
+    Ellipsis,
+    CreatePutForm,
+    SearchForm
+  },
   data () {
     return {
       loadData: parameter => {
@@ -124,7 +148,9 @@ export default {
         status: 0,
         size: 10000
       },
-      tableList: []
+      tableList: [],
+      visible: false,
+      formType: 'create'
     }
   },
   created () {
@@ -132,6 +158,18 @@ export default {
     this.reloadData()
   },
   methods: {
+    createHandler (record) {
+      this.formType = 'create'
+      this.visible = true
+      this.$refs.createForm.resetForm(record)
+    },
+    resetData (flag) {
+      this.visible = flag
+      this.record = null
+    },
+    refreshTable () {
+      this.$refs.table.refresh()
+    },
     /**
      * 点击搜索
      */

+ 144 - 189
src/views/put/modules/CreateForm.vue

@@ -8,42 +8,31 @@
       :visible="drawerVisible"
       :width="950">
       <a-form @submit="handleSubmit" :form="form" class="form">
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="finderUin">
-              <a-input
-                placeholder="请输入作者 finderUin"
-                v-decorator="['finderUin', { rules: [{ required: true, message: '请输入作者 finderUin', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-
-        <a-row class="form-row" :gutter="16">
+        <a-row class="form-row" :gutter="32">
           <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="来源渠道">
-              <a-select size="default" style="width: 200px" v-decorator="['fromChannelName',{ rules: [{ required: true, message: '请选择来源渠道', whitespace: true }] }]" @change="handleSelectChange">
-                <a-select-option v-for="item in fromChannelNameList" :key="String(item.name)" :value="String(item.name)">
+            <a-form-item label="建议等级">
+              <a-select
+                size="default"
+                style="width: 200px"
+                v-decorator="['putLevel',{ rules: [{ required: true, message: '请选择', whitespace: true }] }]"
+                @change="handleSelectChange">
+                <a-select-option v-for="item in levelList" :key="String(item.name)" :value="String(item.name)">
                   {{ item.name }}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
+        </a-row>
 
+        <a-row class="form-row" :gutter="16">
           <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="作者是否有站外账号">
-              <a-select size="default" style="width: 200px" v-decorator="['outSideAccountFlag']">
-                <a-select-option value="1">是</a-select-option>
-                <a-select-option value="0">否</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-
-
-          <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="作者等级">
-              <a-select size="default" style="width: 200px" v-decorator="['level',{ rules: [{ required: true, message: '请选择作者等级', whitespace: true }] }]">
-                <a-select-option v-for="item in authorLevelList" :key="String(item.name)" :value="String(item.name)">
+            <a-form-item label="投放量级">
+              <a-select
+                size="default"
+                style="width: 200px"
+                v-decorator="['putCountLevel',{ rules: [{ required: true, message: '请选择', whitespace: true }] }]"
+                @change="handleSelectChange">
+                <a-select-option v-for="item in levelCountList" :key="String(item.name)" :value="String(item.name)">
                   {{ item.name }}
                 </a-select-option>
               </a-select>
@@ -52,57 +41,50 @@
         </a-row>
 
         <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="微信号">
-              <a-input
-                placeholder="请输入作者微信号"
-                v-decorator="['weChatAccount', { rules: [{ required: true, message: '请输入作者微信号', whitespace: true }] }]"
-              />
+          <a-col :lg="8" :md="12" :sm="24">
+            <a-form-item label="流量标签">
+              <a-cascader :options="authInfoList" placeholder="请选择流量标签" @change="onChange" v-decorator="['putTag',{ rules: [{ required: true }] }]" />
             </a-form-item>
           </a-col>
         </a-row>
 
         <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="视频号账户名">
-              <a-input
-                placeholder="已入驻作者需填写"
-                v-decorator="['videoAccount', { rules: [{ required: false, message: '请输入作者视频号账户名', whitespace: true }] }]"
-              />
+          <a-col :lg="8" :md="12" :sm="24">
+            <a-form-item label="建议投放性别">
+              <a-radio-group v-model="putGender" v-decorator="['putGender', {initialValue:0, rules: [{ required: true}] }]">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+                <a-radio :value="0">不限</a-radio>
+              </a-radio-group>
             </a-form-item>
           </a-col>
         </a-row>
 
         <a-row class="form-row" :gutter="16">
           <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="作者分类">
-              <a-cascader :options="categoryNameList" placeholder="请选择作者分类" @change="onChange" v-decorator="['categoryName',{ rules: [{ required: true }] }]" />
-            </a-form-item>
-          </a-col>
-
-          <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="拟定认证信息">
-              <a-cascader :options="authInfoList" placeholder="请选择拟定认证信息" @change="onChange" v-decorator="['authInfo',{ rules: [{ required: true }] }]" />
-            </a-form-item>
-          </a-col>
-
-          <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="是否本地作者">
-              <a-radio-group v-decorator="['isLocal', { initialValue: 1 }]">
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
+            <a-form-item label="建议投放年龄">
+              <a-select
+                size="default"
+                style="width: 200px"
+                v-decorator="['putAgeStr',{ rules: [{ required: true, message: '请选择', whitespace: true }] }]"
+                @change="handleSelectChange">
+                <a-select-option
+                  v-for="item in putAgeList"
+                  :key="String(item.value)"
+                  :value="String(item.value)">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
         </a-row>
 
-
         <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="影响力描述">
+          <a-col :lg="8" :md="12" :sm="24">
+            <a-form-item label="投放地域">
               <a-input
-                placeholder="作者影响力证明,用于认证申请或流量包申请审核"
-                v-decorator="['prove', { rules: [{ required: true, message: '请输入作者影响力描述', whitespace: true }] }]"
+                placeholder="请输入 "
+                v-decorator="['putCity', { rules: [{ required: true, message: '请输入', whitespace: true }] }]"
               />
             </a-form-item>
           </a-col>
@@ -110,32 +92,40 @@
 
         <a-row class="form-row" :gutter="16">
           <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="是否下发流量">
-              <a-radio-group v-model="isSend" v-decorator="['isSend', {initialValue:0, rules: [{ required: true}] }]">
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
+            <a-form-item label="投放时长">
+              <a-select
+                size="default"
+                style="width: 200px"
+                v-decorator="['putDuration',{ rules: [{ required: true, message: '请选择', whitespace: true }] }]"
+                @change="handleSelectChange">
+                <a-select-option
+                  v-for="item in putDurationList"
+                  :key="String(item.value)"
+                  :value="String(item.value)">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
+        </a-row>
 
-          <a-col :lg="8" :md="12" :sm="24" v-show="isSend">
-            <a-form-item label="下发流量包限额">
-              <a-select size="default" style="width: 200px" v-decorator="['sendCount',{ rules: [{ required: false}] }]">
-                <a-select-option v-for="item in sendCountList" :key="String(item.count)" :value="String(item.count)">
+        <a-row class="form-row" :gutter="16">
+          <a-col :lg="8" :md="12" :sm="24">
+            <a-form-item label="投放理由">
+              <a-select
+                size="default"
+                style="width: 200px"
+                v-decorator="['putReason',{ rules: [{ required: true, message: '请选择', whitespace: true }] }]"
+                @change="handleSelectChange">
+                <a-select-option
+                  v-for="item in putReasonList"
+                  :key="String(item.name)"
+                  :value="String(item.name)">
                   {{ item.name }}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="8" :md="12" :sm="24" v-show="isSend">
-            <a-form-item label="发放原因">
-              <a-radio-group
-                v-decorator="['sendReason', {initialValue:1, rules: [{ required: false}] }]">
-                <a-radio :value="1">新入驻作者</a-radio>
-                <a-radio :value="0">作者首条发文</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
         </a-row>
 
         <div
@@ -155,7 +145,7 @@
             取消
           </a-button>
           <a-button type="primary" @click="handleSubmit">
-            提交
+            投放
           </a-button>
         </div>
       </a-form>
@@ -165,12 +155,11 @@
 
 <script>
 
-import { saveAuthor,fetchAuthor } from '@/api/author'
+import { saveAuthorVideo } from '@/api/author'
 
 export default {
-  name: 'CreateAuthorForm',
-  components: {
-  },
+  name: 'CreatePutForm',
+  components: {},
   props: {
     formType: {
       type: String,
@@ -182,12 +171,14 @@ export default {
   },
   data () {
     return {
-      title: '新增作者',
-      isSend: 0,
+      record: {},
+      title: '发起投放',
       id: null,
       drawerVisible: false,
       form: this.$form.createForm(this, { name: 'create_author' }),
 
+      putGender: '',
+
       // 下放流量信息
       sendCountList: [
         { 'count': 50000, name: '50000点流量券/人' },
@@ -204,18 +195,45 @@ export default {
         { 'id': 4, name: '尾部作者' }
       ],
 
-      // 来源渠道信息
-      fromChannelNameList: [
-        { 'id': 1, name: '市场部-垂类' },
-        { 'id': 2, name: '市场部-城市' },
-        { 'id': 3, name: '市场部-社区' },
-        { 'id': 4, name: '市场部-学生' },
-        { 'id': 5, name: '市场部-海外' },
-        { 'id': 6, name: '公关中心' },
-        { 'id': 7, name: 'IEG项目组' },
-        { 'id': 8, name: 'TME' },
-        { 'id': 9, name: '基础合作' },
-        { 'id': 10, name: '其他' }
+      // 建议等级
+      levelList: [
+        { 'id': 1, name: 'S' },
+        { 'id': 2, name: 'A' },
+        { 'id': 3, name: 'B' },
+        { 'id': 4, name: 'C' },
+        { 'id': 5, name: 'D' }
+      ],
+
+      // levelCountList
+      levelCountList: [
+        { 'id': 1, name: 50000 },
+        { 'id': 2, name: 30000 },
+        { 'id': 3, name: 10000 },
+        { 'id': 4, name: 5000 },
+        { 'id': 5, name: 1000 }
+      ],
+
+      putAgeList: [
+        { 'value': '1-17', name: '1-17岁' },
+        { 'value': '18-24', name: '18-24岁' },
+        { 'value': '25-35', name: '25-35岁' },
+        { 'value': '35-50', name: '35-50岁' },
+        { 'value': '35-50', name: '50岁以上' }
+      ],
+
+      putDurationList: [
+        { 'value': 5, name: '5H' },
+        { 'value': 12, name: '12H' },
+        { 'value': 24, name: '24H' },
+        { 'value': 48, name: '48H' }
+      ],
+
+      putReasonList: [
+        { 'value': '流量激励', name: '流量激励' },
+        { 'value': '新作者冷启动', name: '新作者冷启动' },
+        { 'value': '资源置换', name: '资源置换' },
+        { 'value': '优质低数据作者', name: '优质低数据作者' },
+        { 'value': '其他', name: '其他' }
       ],
 
       // 作者认证分类信息
@@ -597,7 +615,7 @@ export default {
       this.drawerVisible = val
     },
     formType (val) {
-      this.title = (val === 'create' ? '新增作者' : '更新作者')
+      this.title = (val === 'create' ? '发起投放' : '更新作者')
     }
   },
   created () {
@@ -609,44 +627,37 @@ export default {
     handleSubmit (e) {
       e.preventDefault()
       this.form.validateFieldsAndScroll((err, values) => {
+        console.log(this.$route.query.id)
         if (!err) {
           console.log('Received values of form: ', values)
           const createParams = { ...values }
 
-          if (createParams.categoryName !== undefined) {
-            createParams.categoryName = createParams.categoryName[createParams.categoryName.length - 1]
+          if (createParams.putTag !== undefined) {
+            this.record.putTag = createParams.putTag[createParams.putTag.length - 1]
           }
 
-          if (createParams.authInfo !== undefined) {
-            createParams.authInfo = createParams.authInfo[createParams.authInfo.length - 1]
+          if (createParams.putAgeStr !== undefined) {
+            this.record.putAgeStart = createParams.putAgeStr.split('-')[0]
+            this.record.putAgeEnd = createParams.putAgeStr.split('-')[1]
           }
 
-          createParams.outSideAccountFlag = createParams.outSideAccountFlag === '是' ? 1 : 0
+          if (createParams.putGender !== undefined) {
+            this.record.putGender = createParams.putGender === 0 ? '不限' : createParams.putGender === 1 ? '男' : '女'
+          }
 
-          if (this.formType === 'create') {
-            saveAuthor(createParams)
-              .then(response => {
-                this.$notification.success({
-                  message: response.message
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
-              })
-          } else {
-            createParams['id'] = this.id
-            saveAuthor(createParams)
-              .then(response => {
-                this.$notification.success({
-                  message: response.message
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
+          createParams.status = 1
+          createParams.id = this.record.id
+          var obj = Object.assign(createParams, this.record)
+          saveAuthorVideo(obj)
+            .then(response => {
+              this.$notification.success({
+                message: response.message
               })
-          }
+              this.$emit('refreshTable')
+            })
+            .catch(err => {
+              console.log(err)
+            })
 
           this.content = ''
           this.form.resetFields()
@@ -655,71 +666,15 @@ export default {
         }
       })
     },
-    handleEdit (record) {
-      this.id = record.id
-      fetchAuthor(record.id)
-        .then(response => {
-          const postForm = response.model
-          console.log(postForm)
-          this.isSend = postForm.isSend
-
-          this.form.resetFields()
-          this.form = this.$form.createForm(this, {
-            onFieldsChange: (_, changedFields) => {},
-            mapPropsToFields: () => {
-              return {
-                finderUin: this.$form.createFormField({
-                  value: postForm.finderUin
-                }),
-                fromChannelName: this.$form.createFormField({
-                  value: postForm.fromChannelName
-                }),
-                outSideAccountFlag: this.$form.createFormField({
-                  value: postForm.outSideAccountFlag === 1 ? '是' : '否'
-                }),
-                level: this.$form.createFormField({
-                  value: postForm.level
-                }),
-                weChatAccount: this.$form.createFormField({
-                  value: postForm.weChatAccount
-                }),
-                videoAccount: this.$form.createFormField({
-                  value: postForm.videoAccount
-                }),
-                isLocal: this.$form.createFormField({
-                  value: postForm.isLocal
-                }),
-                isSend: this.$form.createFormField({
-                  value: postForm.isSend
-                }),
-                sendCount: this.$form.createFormField({
-                  value: postForm.sendCount
-                }),
-                sendReason: this.$form.createFormField({
-                  value: postForm.sendReason
-                }),
-                prove: this.$form.createFormField({
-                  value: postForm.prove
-                })
-              }
-            },
-            onValuesChange: (_, values) => {
-              console.log(values)
-            }
-          })
-        })
-        .catch(err => {
-          console.log(err)
-        })
-      this.drawerVisible = true
-    },
     onClose () {
-      this.resetForm()
+      this.resetForm(this.record)
       this.drawerVisible = false
       this.$emit('resetData', false)
     },
-    resetForm () {
-      this.isSend = 0
+    resetForm (record) {
+      this.record = record
+      this.id = record.id
+      console.log(record)
       this.form.resetFields()
     },
     handleChange ({ fileList }) {