Commit 9c89611f authored by cellee's avatar cellee

小区 h5 链接, 报告员回复修复

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent e2fac3e6
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-12-03 11:27:07 * @Date: 2020-12-03 11:27:07
* @LastEditTime: 2020-12-03 14:04:53 * @LastEditTime: 2021-03-15 11:55:16
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\access.ts * @FilePath: \tostumi\src\access.ts
......
src/assets/h5.png

6.84 KB | W: | H:

src/assets/h5.png

7.79 KB | W: | H:

src/assets/h5.png
src/assets/h5.png
src/assets/h5.png
src/assets/h5.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -80,7 +80,8 @@ const PictureOptionsRow = (props: any) => { ...@@ -80,7 +80,8 @@ const PictureOptionsRow = (props: any) => {
// 加载logo // 加载logo
const uploadButton = ( const uploadButton = (
<div> <div>
{loadding ? <LoadingOutlined /> : <PlusOutlined />} {/* {loadding ? <LoadingOutlined /> : <PlusOutlined />} */}
<PlusOutlined />
<div className="ant-upload-text">Upload</div> <div className="ant-upload-text">Upload</div>
</div> </div>
); );
...@@ -167,7 +168,7 @@ const PictureOptionsRow = (props: any) => { ...@@ -167,7 +168,7 @@ const PictureOptionsRow = (props: any) => {
onRemove={onRemove} // 删除 onRemove={onRemove} // 删除
beforeUpload={beforeUpload} beforeUpload={beforeUpload}
onChange={handleChange} // 点击上传 onChange={handleChange} // 点击上传
disabled={props.over} disabled={props.over || props.overs}
> >
{fileList.length >= limitNum || props.overs ? null : props.disabled ? null : uploadButton} {fileList.length >= limitNum || props.overs ? null : props.disabled ? null : uploadButton}
</Upload> </Upload>
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-01-14 09:23:51 * @Date: 2021-01-14 09:23:51
* @LastEditTime: 2021-03-04 10:27:51 * @LastEditTime: 2021-03-11 14:36:23
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts * @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
message.error(`The information does not exist!`); message.error(`The information does not exist!`);
history.push('/AccountManagement/service'); history.push('/AccountManagement/service');
} else { } else {
console.log(playload); // console.log(playload);
switch (playload.index) { switch (playload.index) {
case 68: // 获取列表 case 68: // 获取列表
{ {
......
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-03-15 11:56:25
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\LContract\Contract.ts
*/
import { getRemoveList } from '@/services/package/contract'; import { getRemoveList } from '@/services/package/contract';
import { message } from 'antd'; import { message } from 'antd';
......
...@@ -116,6 +116,8 @@ const service = (props: any) => { ...@@ -116,6 +116,8 @@ const service = (props: any) => {
let t = { ...term, ...p }; let t = { ...term, ...p };
setTerm(t); setTerm(t);
RA(68, t, module, dispatch); RA(68, t, module, dispatch);
// console.log(page)
}; };
return ( return (
...@@ -161,7 +163,7 @@ const service = (props: any) => { ...@@ -161,7 +163,7 @@ const service = (props: any) => {
}; };
function map(state: any) { function map(state: any) {
console.log(state); // console.log(state);
const loading = state.loading.models.ServicePro; const loading = state.loading.models.ServicePro;
const Init = state.Init; const Init = state.Init;
const { Data, curString, village } = state[module]; const { Data, curString, village } = state[module];
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-03-02 14:39:40 * @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-03-08 17:03:45 * @LastEditTime: 2021-03-15 15:21:27
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx * @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
...@@ -21,12 +21,16 @@ import PictureOptionsRow from '@/components/PictureOptions/PictureOptionsRow'; ...@@ -21,12 +21,16 @@ import PictureOptionsRow from '@/components/PictureOptions/PictureOptionsRow';
import moment from 'moment'; import moment from 'moment';
import { getUrlPicName } from '@/utils/string';
const service = (props: any) => { const service = (props: any) => {
const { DataSave, dispatch, loading, match } = props; const { DataSave, dispatch, loading, match } = props;
const [term, setTerm] = useState(null as any); // 默认小区 const [term, setTerm] = useState(null as any); // 默认小区
const [ImageSrc, setImageSrc] = useState([] as any); // 图片地址 const [ImageSrc, setImageSrc] = useState([] as any); // 图片地址
const [imgs, setImgs] = useState([] as any); // 回复地址
const [form] = Form.useForm(); const [form] = Form.useForm();
// 监听是否有数据 // 监听是否有数据
useEffect(() => { useEffect(() => {
...@@ -50,6 +54,7 @@ const service = (props: any) => { ...@@ -50,6 +54,7 @@ const service = (props: any) => {
let a = DataSave.reportPictures.map((item: any, i: any) => { let a = DataSave.reportPictures.map((item: any, i: any) => {
let img = DataSave.reportImages.split(','); let img = DataSave.reportImages.split(',');
let key = img[i]; let key = img[i];
return { return {
uid: i, uid: i,
name: key, name: key,
...@@ -60,13 +65,35 @@ const service = (props: any) => { ...@@ -60,13 +65,35 @@ const service = (props: any) => {
// 图片列表 // 图片列表
setImageSrc(a); setImageSrc(a);
} }
if (DataSave.replyData.length > 0) {
// 图片名any
let b = [] as any;
DataSave.replyData[0].replyPictures.map((item: any, i: any) => {
let obj = {
uid: i,
name: getUrlPicName(item),
status: 'done',
url: item,
};
b.push(obj);
});
// 回复列表
setImgs(b);
form.setFieldsValue({
replyContent: DataSave.replyData[0].replyContent,
});
}
} }
}, [DataSave]); }, [DataSave]);
//onFinish 提交 //onFinish 提交
const onFinish = (values: any) => { const onFinish = (values: any) => {
values.id = match.params.id; values.id = match.params.id;
values.reportImages = values.reportImages.join(','); values.reportImages = values.reportImages ? values.reportImages.join(',') : null;
values.replyImages = values.replyImages ? values.replyImages.join(',') : null;
RA(70, values, module, dispatch); RA(70, values, module, dispatch);
}; };
...@@ -137,6 +164,26 @@ const service = (props: any) => { ...@@ -137,6 +164,26 @@ const service = (props: any) => {
over={loading} over={loading}
/> />
</Form.Item> </Form.Item>
<hr></hr>
{/* --------------------------------------------------------------------------------------------- */}
{/* 回复内容 */}
<Form.Item label="Overview" name="replyContent" rules={[{ required: true }]}>
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
</Form.Item>
{/* 回复图片 */}
<Form.Item label="Picture" name="replyImages">
<PictureOptionsRow
action="/tos/image/upload"
data={{
// imageType: 'tosReportImage',
imageType: 'tosReplyImage',
identification: '',
}}
limitNums={10}
imgs={imgs}
/>
</Form.Item>
<hr></hr>
{/* --------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------- */}
{/* 提交 */} {/* 提交 */}
<Form.Item label=" " colon={false}> <Form.Item label=" " colon={false}>
......
...@@ -127,7 +127,6 @@ const Account = (props: any) => { ...@@ -127,7 +127,6 @@ const Account = (props: any) => {
// 编辑- 新增 // 编辑- 新增
const edit = (item: any) => { const edit = (item: any) => {
console.log(item);
// 无论编辑还是新增都清掉二级账户选择 // 无论编辑还是新增都清掉二级账户选择
dispatch({ type: 'Account/InfoClear' }); dispatch({ type: 'Account/InfoClear' });
if (item == 1) { if (item == 1) {
......
...@@ -31,6 +31,14 @@ const Detail = (props: any) => { ...@@ -31,6 +31,14 @@ const Detail = (props: any) => {
const [ModelExcel, setModelExcel] = useState(false); const [ModelExcel, setModelExcel] = useState(false);
const [ModelResult, setModelResult] = useState(null as any); const [ModelResult, setModelResult] = useState(null as any);
// 小区二维码地址
// 本地 http://192.168.1.28:8611/ 图片名称 h5
// 新加坡测 http://120.77.240.215:8611/ 图片名称 h51
// 正式 http://47.74.233.180:8611/ 图片名称 h52
const usage = 'http://120.77.240.215:8611/';
const codeUrl = require('@/assets/h51.png');
// match 是路由属性 // match 是路由属性
useEffect(() => { useEffect(() => {
if (match) { if (match) {
...@@ -328,7 +336,7 @@ const Detail = (props: any) => { ...@@ -328,7 +336,7 @@ const Detail = (props: any) => {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
openDows(require('@/assets/h5.png'), 'code.png'); openDows(codeUrl, 'code.png');
}} }}
> >
Download Download
...@@ -338,12 +346,12 @@ const Detail = (props: any) => { ...@@ -338,12 +346,12 @@ const Detail = (props: any) => {
placeholder="Basic usage" placeholder="Basic usage"
disabled disabled
style={{ width: '280px' }} style={{ width: '280px' }}
value="http://47.74.233.180:8651/tosVisitorNo" value={usage}
/> />
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
copy('http://47.74.233.180:8651/tosVisitorNo'); copy(usage);
}} }}
> >
Copy Copy
......
...@@ -26,6 +26,7 @@ export const getUrlPicName = (str: any) => { ...@@ -26,6 +26,7 @@ export const getUrlPicName = (str: any) => {
} else { } else {
var tmp = str.split('?'); var tmp = str.split('?');
var tmp2 = tmp[0].split('/'); var tmp2 = tmp[0].split('/');
// console.log(tmp2[tmp2.length - 1]);
return tmp2[tmp2.length - 1]; return tmp2[tmp2.length - 1];
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment