| | |
| | | if (endTime == null) { |
| | | endTime = Date.now(); |
| | | } |
| | | console.log(res.attachments) |
| | | this.setState({ |
| | | savedate: { |
| | | ...res.activity, |
| | |
| | | size: this.state.pageSize, |
| | | }) |
| | | .then(res => { |
| | | console.log('res', res); |
| | | this.setState({ |
| | | modalLoading: false |
| | | }) |
| | |
| | | } |
| | | |
| | | handleOk = (e) => { |
| | | console.log(e) |
| | | this.setState({ |
| | | questionnaireModal: false, |
| | | selectedRowKeys: [] |
| | | }) |
| | | } |
| | | |
| | | questionnaireSearch = (value) => { |
| | | console.log(value) |
| | | } |
| | | |
| | | submit = () => { |
| | | const { savedate, selectedQuestionnaireData, fileList } = this.state; |
| | | savedate.startTime = moment(savedate.startDate + " " + moment(savedate.startHour).format(format), 'YYYY-MM-DD HH:mm') |
| | | savedate.endTime = moment(savedate.endDate + " " + moment(savedate.endHour).format(format), 'YYYY-MM-DD HH:mm') |
| | | // console.log({...savedate,queId:selectedQuestionnaireData[0].id}); |
| | | console.log(savedate); |
| | | console.log(selectedQuestionnaireData); |
| | | if (!savedate.host) { |
| | | message.warning("主持人不能为空"); |
| | | return; |
| | |
| | | } |
| | | |
| | | getNum = (e) => { |
| | | console.log(e.target.value) |
| | | this.setState({ |
| | | num: e.target.value |
| | | }) |
| | |
| | | } |
| | | |
| | | confirm = (e) => { |
| | | console.log(e); |
| | | const data = { id: e, status: 2 }; |
| | | this.setState({ loading: true }) |
| | | Fetch.auditPerson(data).then(res => { |
| | | if (res.code == 0) { |
| | | console.log(res) |
| | | this.setState({ loading: false }) |
| | | message.success('审核通过'); |
| | | this.getDetail(); |
| | |
| | | } |
| | | |
| | | cancel = (e) => { |
| | | console.log(e); |
| | | const data = { id: e, status: 4 }; |
| | | this.setState({ loading: true }) |
| | | Fetch.auditPerson(data).then(res => { |
| | | if (res.code == 0) { |
| | | console.log(res) |
| | | this.setState({ loading: false }) |
| | | message.error('审核不通过'); |
| | | this.getDetail(); |
| | |
| | | } |
| | | |
| | | handleEditorChange = (editorState) => { |
| | | console.log('editorState', editorState) |
| | | this.setState({ editorState }) |
| | | const htmlContent = editorState.toHTML() |
| | | console.log(htmlContent) |
| | | this.setState(({ savedate }) => ({ |
| | | savedate: { |
| | | ...savedate, |
| | | course: htmlContent |
| | | } |
| | | })) |
| | | } |
| | | |
| | | submitContent = () => { |
| | | // 在编辑器获得焦点时按下ctrl+s会执行此方法 |
| | | // 编辑器内容提交到服务端之前,可直接调用editorState.toHTML()来获取HTML格式的内容 |
| | | const htmlContent = this.state.editorState.toHTML() |
| | | console.log(htmlContent) |
| | | this.setState(({ savedate }) => ({ |
| | | savedate: { |
| | | ...savedate, |
| | |
| | | |
| | | onSelectChange = (selectedRowKeys, selectedRows) => { |
| | | const { tableData } = this.state; |
| | | console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | console.log('selectedRowKeys changed: ', selectedRows); |
| | | console.log(tableData[selectedRowKeys[0]]); |
| | | console.log(tableData); |
| | | this.setState({ |
| | | selectedQuestionnaireData: tableData[selectedRowKeys[0]], |
| | | selectedRowKeys |
| | |
| | | handleCancel = () => this.setState({ previewVisible: false }) |
| | | render() { |
| | | const { savedate, previewVisible, previewImage, editorState, selectedRowKeys, fileList, attList1, dateSource, code, hitList, activityType, disabled, loading, modalLoading } = this.state; |
| | | console.log('disabled', fileList) |
| | | const props = { |
| | | action: domain + 'api/v1/attachment/materials?entityId=' + savedate.id, |
| | | onChange: ({ file, fileList }) => { |
| | |
| | | </Popconfirm> : <span disabled></span> |
| | | ) |
| | | }]; |
| | | console.log('savedate.activityStatus', savedate.activityStatus) |
| | | console.log('savedate.activityType', savedate.activityType) |
| | | return ( |
| | | <div className="app-page"> |
| | | <Spin spinning={loading}> |
| | |
| | | xhr.open('POST', serverURL, true) |
| | | xhr.send(fd) |
| | | } |
| | | handleEditorChange = (editorState) => { |
| | | this.setState({ editorState }) |
| | | const htmlContent = editorState.toHTML() |
| | | console.log(htmlContent) |
| | | this.setState(({ savedate }) => ({ |
| | | savedate: { |
| | | ...savedate, |
| | | content: htmlContent |
| | | } |
| | | })) |
| | | } |
| | | |
| | | submitContent = () => { |
| | | // 在编辑器获得焦点时按下ctrl+s会执行此方法 |
| | |
| | | })) |
| | | } |
| | | |
| | | handleEditorChange = (editorState) => { |
| | | this.setState({ editorState }) |
| | | } |
| | | |
| | | render() { |
| | | const { dateSource, show, visible, closeKey, selectedRow, savedate, fileList, editorState } = this.state; |
| | |
| | | <Col span={18} push={0} style={{ border: 'solid 1px rgba(0, 0, 0, 0.25)', borderRadius: '5PX' }} > |
| | | <BraftEditor |
| | | value={editorState} |
| | | placeholder='请输入文章内容' |
| | | placeholder='请输入活动进程' |
| | | media={{ |
| | | allowPasteImage: true, // 是否允许直接粘贴剪贴板图片(例如QQ截图等)到编辑器 |
| | | image: true, // 开启图片插入功能 |
| | |
| | | status: '', |
| | | loading: false, |
| | | socialTaskObject: '', |
| | | // rowNum: 4, |
| | | editorState: BraftEditor.createEditorState(null), |
| | | editorStatetaskProcess: BraftEditor.createEditorState(null), |
| | | }; |
| | |
| | | taskType: res.taskType || 1, |
| | | // status: res.activityStatus || '', |
| | | socialTaskObject: res.socialTaskObject ? { id: res.socialTaskObject.objectId, objectName: res.socialTaskObject.objectName, taskReport: res.socialTaskObject.taskReport } : {}, |
| | | // rowNum: ReplaceSeperator(res.socialTaskObject.taskReport), |
| | | disabled: res.status ? true : false, |
| | | fileList: res.attachments || [], |
| | | loading: false, |
| | |
| | | })) |
| | | } |
| | | |
| | | uploadFn = (param) => { |
| | | |
| | | const serverURL = domain + 'api/v1/attachment/upload' |
| | | const xhr = new XMLHttpRequest |
| | | const fd = new FormData() |
| | | const successFn = (response) => { |
| | | // 假设服务端直接返回文件上传后的地址 |
| | | // 上传成功后调用param.success并传入上传后的文件地址 |
| | | //Pz |
| | | const res = JSON.parse(xhr.responseText); |
| | | param.success({ |
| | | url: domain + 'api/v1/attachment/image/' + res[0].id, |
| | | meta: { |
| | | id: res[0].id, |
| | | title: res[0].name, |
| | | alt: res[0].name, |
| | | loop: true, // 指定音视频是否循环播放 |
| | | autoPlay: true, // 指定音视频是否自动播放 |
| | | controls: true, // 指定音视频是否显示控制栏 |
| | | poster: domain + 'api/v1/attachment/image/' + res[0].id, // 指定视频播放器的封面 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const progressFn = (event) => { |
| | | // 上传进度发生变化时调用param.progress |
| | | param.progress(event.loaded / event.total * 100) |
| | | } |
| | | |
| | | const errorFn = (response) => { |
| | | // 上传发生错误时调用param.error |
| | | param.error({ |
| | | msg: 'unable to upload.' |
| | | }) |
| | | } |
| | | xhr.upload.addEventListener("progress", progressFn, false) |
| | | xhr.addEventListener("load", successFn, false) |
| | | xhr.addEventListener("error", errorFn, false) |
| | | xhr.addEventListener("abort", errorFn, false) |
| | | fd.append('file', param.file) |
| | | xhr.open('POST', serverURL, true) |
| | | xhr.send(fd) |
| | | } |
| | | |
| | | handleEditorChange = (editorState) => { |
| | | this.setState({ editorState }) |
| | | const htmlContent = editorState.toHTML() |
| | | console.log(htmlContent) |
| | | this.setState(({ savedate }) => ({ |
| | | savedate: { |
| | | ...savedate, |
| | | taskRequire: htmlContent |
| | | } |
| | | })) |
| | | } |
| | | |
| | | handleEditorLChange = (editorStatetaskProcess) => { |
| | | this.setState({ editorStatetaskProcess }) |
| | | const htmlContent = editorStatetaskProcess.toHTML() |
| | | this.setState(({ savedate }) => ({ |
| | | savedate: { |
| | | ...savedate, |
| | | taskProcess: htmlContent |
| | | } |
| | | })) |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | function disabledDate(current) { |
| | | // Can not select days before today and today |
| | | return current && current < moment().endOf('day'); |
| | | } |
| | | function ReplaceSeperator(mobiles) { |
| | | var i; |
| | | var result = ""; |
| | | var c; |
| | | for (i = 0; i < mobiles.length; i++) { |
| | | c = mobiles.substr(i, 1); |
| | | if (c == "\n") |
| | | result = result + "<br/>"; |
| | | // else if (c != "\r") |
| | | // result = result + c; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | }, this.showList(option.title)) |
| | | }, |
| | | |
| | | showList: function (title) { |
| | | showList: function(title) { |
| | | var that = this; |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/article/publicMsgQuery?page=1&size=' + that.data.size + '&flag=' +title, |
| | | url: app.globalData.url + '/api/article/publicMsgQuery?page=1&size=' + that.data.size + '&flag=' + title, |
| | | success: function(res) { |
| | | console.log(res) |
| | | if (res.data.code == 0) { |
| | |
| | | link: function(event) { |
| | | // 跳转详情页面 |
| | | var id = event.currentTarget.dataset['id']; |
| | | var flag = '办事指南详情'; |
| | | var flag = this.data.title + '信息详情'; |
| | | wx.navigateTo({ |
| | | url: '../publicMsgDetails/publicMsgDetails?id=' + id + '&flag=' + flag, |
| | | }) |
| | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) {}, |
| | | onLoad: function(options) {}, |
| | | |
| | | // 输入框内容 |
| | | inputHandler: function (event) { |
| | | inputHandler: function(event) { |
| | | var type = event.currentTarget.dataset['type']; |
| | | console.log(type) |
| | | console.log(event.detail.value) |
| | |
| | | }, |
| | | |
| | | //登录 |
| | | simulationButton: function () { |
| | | simulationButton: function() { |
| | | const { |
| | | companyAccount, |
| | | companyPassword |
| | | } = this.data; |
| | | if (!companyAccount) { |
| | | return wx.showToast({ |
| | | title: '账号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | if (!companyPassword) { |
| | | return wx.showToast({ |
| | | title: '密码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | let that = this; |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/socialCompany/loginCheck', |
| | |
| | | companyAccount, |
| | | companyPassword |
| | | }, |
| | | success: function (res) { |
| | | success: function(res) { |
| | | console.log(res) |
| | | if (res.data.code == 0) { |
| | | wx.showToast({ |
| | | title: '登录成功!', |
| | | icon: 'success', |
| | | duration: 1500, |
| | | success: function () { |
| | | success: function() { |
| | | wx.setStorageSync('id', res.data.data.id) |
| | | setTimeout(() => { |
| | | wx.navigateTo({ |
| | |
| | | |
| | | //预览图片 |
| | | previewImage: function(e) { |
| | | console.log('预览') |
| | | app.previewImage(e) |
| | | }, |
| | | |
| | |
| | | </div> |
| | | <div class="detail-img"> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList22}}" wx:key="{{key}}"> |
| | | <image src="{{item.path}}" class="upload" bindtap="previewImage" data-src="{{item.pic}}"></image> |
| | | <image src="{{item.path}}" class="upload" bindtap="previewImage" data-src="{{item.path}}"></image> |
| | | </view> |
| | | <view class="educt_hasupload_pic" wx:for="{{attList.attList23}}" wx:key="{{key}}"> |
| | | <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image> |
| | |
| | | { |
| | | "description": "项目配置文件。", |
| | | "setting": { |
| | | "urlCheck": false, |
| | | "urlCheck": true, |
| | | "es6": true, |
| | | "postcss": true, |
| | | "preloadBackgroundData": false, |
| | | "minified": true, |
| | | "newFeature": true, |
| | | "coverView": true, |
| | |
| | | "ignore": [], |
| | | "disablePlugins": [], |
| | | "outputPath": "" |
| | | } |
| | | }, |
| | | "preloadBackgroundData": false |
| | | }, |
| | | "compileType": "miniprogram", |
| | | "libVersion": "2.10.1", |