huwhois 5 ans auparavant
Parent
commit
0c01cd8d76

+ 5 - 10
src/views/modules/admin/lecture-add-or-update.vue

25
          </el-option>
25
          </el-option>
26
        </el-select>
26
        </el-select>
27
      </template>
27
      </template>
28
      <!-- <el-input v-model="dataForm.attendersId" placeholder="演讲人id"></el-input> --><el-input v-model="dataForm.attendersId" placeholder="参会人员id"></el-input>
28
      <!-- <el-input v-model="dataForm.attendersId" placeholder="演讲人id"></el-input> -->
29
    </el-form-item>
29
    </el-form-item>
30
    <el-form-item label="题目" prop="topic">
30
    <el-form-item label="题目" prop="topic">
31
      <el-input v-model="dataForm.topic" placeholder="题目"></el-input>
31
      <el-input v-model="dataForm.topic" placeholder="题目"></el-input>
73
          meetingId: [
73
          meetingId: [
74
            { required: true, message: '会议id不能为空', trigger: 'blur' }
74
            { required: true, message: '会议id不能为空', trigger: 'blur' }
75
          ],
75
          ],
76
          attendersId: [
77
            { required: true, message: '参会人员id不能为空', trigger: 'blur' }
78
          ],
76
          // attendersId: [
77
          //   { required: true, message: '参会人员id不能为空', trigger: 'blur' }
78
          // ],
79
          topic: [
79
          topic: [
80
            { required: true, message: '题目不能为空', trigger: 'blur' }
80
            { required: true, message: '题目不能为空', trigger: 'blur' }
81
          ],
81
          ],
87
          ],
87
          ],
88
          summary: [
88
          summary: [
89
            { required: true, message: '摘要不能为空', trigger: 'blur' }
89
            { required: true, message: '摘要不能为空', trigger: 'blur' }
90
          ],
91
          createTime: [
92
            { required: true, message: '創建時間不能为空', trigger: 'blur' }
93
          ],
94
          isDel: [
95
            { required: true, message: '是否被删除 状态  0:正常   1:删除不能为空', trigger: 'blur' }
96
          ]
90
          ]
97
        },
91
        },
98
        options: [],
92
        options: [],
125
            })
119
            })
126
          }
120
          }
127
        })
121
        })
122
        this.meetingId = this.$route.params.id
128
      },
123
      },
129
      // 表单提交
124
      // 表单提交
130
      dataFormSubmit () {
125
      dataFormSubmit () {

+ 2 - 0
src/views/modules/admin/lecture.vue

129
      // 获取数据列表
129
      // 获取数据列表
130
      getDataList () {
130
      getDataList () {
131
        this.dataListLoading = true
131
        this.dataListLoading = true
132
        let meetingId = this.$route.params.id
132
        this.$http({
133
        this.$http({
133
          url: this.$http.adornUrl('/admin/lecture/list'),
134
          url: this.$http.adornUrl('/admin/lecture/list'),
134
          method: 'get',
135
          method: 'get',
135
          params: this.$http.adornParams({
136
          params: this.$http.adornParams({
137
            'meetingId': meetingId,
136
            'page': this.pageIndex,
138
            'page': this.pageIndex,
137
            'limit': this.pageSize,
139
            'limit': this.pageSize,
138
            'key': this.dataForm.key
140
            'key': this.dataForm.key

+ 54 - 1
src/views/modules/admin/member-add-or-update.vue

23
      <el-form-item label="头像" prop="titlePic">
23
      <el-form-item label="头像" prop="titlePic">
24
        <el-input v-model="dataForm.titlePic" placeholder="头像"></el-input>
24
        <el-input v-model="dataForm.titlePic" placeholder="头像"></el-input>
25
      </el-form-item>
25
      </el-form-item>
26
      <el-row>
27
        <img :src="showimg" alt="">
28
      </el-row>
29
      <el-upload
30
      :action="upload_url"
31
      ref="upload"
32
      :before-upload="beforeUploadHandle"
33
      :on-success="successHandle"
34
      name="upload_file"
35
      :auto-upload="false"
36
      :data="thumb"
37
      style="text-align: center;">
38
      <i class="el-icon-upload"></i>
39
       <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
40
      <div class="el-upload__tip" slot="tip">只支持jpg、png、gif格式的图片!只能上传jpg/png文件,且不超过2M</div>
41
      <el-radio v-model="radio" label="1">是</el-radio>
42
      <el-radio v-model="radio" label="0" >否</el-radio>
43
      <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
44
    </el-upload>
26
      <el-form-item label="所属机构" prop="organization">
45
      <el-form-item label="所属机构" prop="organization">
27
        <el-input v-model="dataForm.organization" placeholder="所属机构"></el-input>
46
        <el-input v-model="dataForm.organization" placeholder="所属机构"></el-input>
28
      </el-form-item>
47
      </el-form-item>
125
        password: [{ validator: checkPwd, trigger: 'blur' }],
144
        password: [{ validator: checkPwd, trigger: 'blur' }],
126
        phone: [{ validator: checkPhone, trigger: 'blur' }],
145
        phone: [{ validator: checkPhone, trigger: 'blur' }],
127
        email: [{ validator: checkEmail, trigger: 'blur' }]
146
        email: [{ validator: checkEmail, trigger: 'blur' }]
128
      }
147
      },
148
      upload_url: '',
149
      radio: '0',
150
      thumb: {'isthumb': 0},
151
      showimg: ''
129
    }
152
    }
130
  },
153
  },
131
  methods: {
154
  methods: {
156
              this.dataForm.createTime = data.member.createTime
179
              this.dataForm.createTime = data.member.createTime
157
              this.dataForm.modifyTime = data.member.modifyTime
180
              this.dataForm.modifyTime = data.member.modifyTime
158
              this.dataForm.isCheck = data.member.isCheck
181
              this.dataForm.isCheck = data.member.isCheck
182
              this.showimg = 'http://121.42.53.174:9008/static' + data.member.titlePic
159
            }
183
            }
160
          })
184
          })
161
        }
185
        }
162
      })
186
      })
187
      // 上传路径
188
      this.upload_url = this.$http.adornUrl(`/sys/filemanager/uploadimg?token=${this.$cookie.get('token')}`)
163
    },
189
    },
164
    // 表单提交
190
    // 表单提交
165
    dataFormSubmit () {
191
    dataFormSubmit () {
204
          })
230
          })
205
        }
231
        }
206
      })
232
      })
233
    },
234
    // 上传图像
235
    submitUpload () {
236
      this.$refs.upload.submit()
237
    },
238
    // 上传之前
239
    beforeUploadHandle (file) {
240
      this.thumb.isthumb = this.radio
241
      if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {
242
        this.$message.error('只支持jpg、png、gif格式的图片!')
243
        return false
244
      }
245
    },
246
    // 上传成功
247
    successHandle (response) {
248
      console.log(response)
249
      if (response && response.code === 0) {
250
        if (response.hasOwnProperty('thumb')) {
251
          this.dataForm.titlePic = response.thumb
252
          this.showimg = 'http://121.42.53.174:9008/static' + response.thumb
253
        } else {
254
          this.showimg = 'http://121.42.53.174:9008/static' + response.picname
255
          this.dataForm.titlePic = response.picname
256
        }
257
      } else {
258
        this.$message.error(response.msg)
259
      }
207
    }
260
    }
208
  }
261
  }
209
}
262
}

+ 6 - 2
src/views/modules/admin/paper.vue

2
  <div class="mod-config">
2
  <div class="mod-config">
3
    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
3
    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
4
      <el-form-item>
4
      <el-form-item>
5
        <el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
5
        <el-input v-model="dataForm.key" placeholder="请输入投稿题目/投稿人" clearable></el-input>
6
      </el-form-item>
6
      </el-form-item>
7
      <el-form-item>
7
      <el-form-item>
8
        <el-button @click="getDataList()">查询</el-button>
8
        <el-button @click="getDataList()">查询</el-button>
9
        <el-button v-if="isAuth('admin:paper:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
9
        <el-button v-if="isAuth('admin:paper:save')" type="primary" @click="addOrUpdateHandle()">添加投稿</el-button>
10
        <el-button v-if="isAuth('admin:paper:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
10
        <el-button v-if="isAuth('admin:paper:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
11
      </el-form-item>
11
      </el-form-item>
12
       <el-form-item>
13
        <el-button v-if="isAuth('admin:paperrequire:save')" type="primary" @click="addOrUpdateHandle()">征文要求设置</el-button>
14
      </el-form-item>
12
    </el-form>
15
    </el-form>
13
    <el-table
16
    <el-table
14
      :data="dataList"
17
      :data="dataList"
98
101
99
<script>
102
<script>
100
  import AddOrUpdate from './paper-add-or-update'
103
  import AddOrUpdate from './paper-add-or-update'
104
  import PagerRequireSet from './paperrequire-add-or-update'
101
  export default {
105
  export default {
102
    data () {
106
    data () {
103
      return {
107
      return {

+ 66 - 0
src/views/modules/admin/upload.vue

1
<template>
2
  <el-dialog
3
    title="上传文件"
4
    :close-on-click-modal="false"
5
    @close="closeHandle"
6
    :visible.sync="visible">
7
    <el-upload
8
      :action="url"
9
      ref="upload"
10
      :before-upload="beforeUploadHandle"
11
      :on-success="successHandle"
12
      name="upload_file"
13
      :auto-upload="false"
14
      :data="thumb"
15
      style="text-align: center;">
16
      <i class="el-icon-upload"></i>
17
       <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
18
      <div class="el-upload__tip" slot="tip">只支持jpg、png、gif格式的图片!只能上传jpg/png文件,且不超过2M</div>
19
      <el-radio v-model="radio" label="1">是</el-radio>
20
      <el-radio v-model="radio" label="0" >否</el-radio>
21
      <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
22
    </el-upload>
23
  </el-dialog>
24
</template>
25
26
<script>
27
  export default {
28
    data () {
29
      return {
30
        visible: false,
31
        url: '',
32
        radio: '0',
33
        thumb: {'isthumb': 0}
34
      }
35
    },
36
    methods: {
37
      init (id) {
38
        this.url = this.$http.adornUrl(`/sys/filemanager/uploadimg`)
39
        this.visible = true
40
      },
41
      submitUpload () {
42
        this.$refs.upload.submit()
43
      },
44
      // 上传之前
45
      beforeUploadHandle (file) {
46
        this.thumb.isthumb = this.radio
47
        if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {
48
          this.$message.error('只支持jpg、png、gif格式的图片!')
49
          return false
50
        }
51
      },
52
      // 上传成功
53
      successHandle (response) {
54
        console.log(response)
55
        if (response && response.code === 0) {
56
          this.visible = false
57
        } else {
58
          this.$message.error(response.msg)
59
        }
60
      }
61
      // // 弹窗关闭时
62
      // closeHandle () {
63
      // }
64
    }
65
  }
66
</script>