Commit 9c89611f authored by cellee's avatar cellee

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

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent e2fac3e6
/*
* @Author: your name
* @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
* @Description: In User Settings Edit
* @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) => {
// 加载logo
const uploadButton = (
<div>
{loadding ? <LoadingOutlined /> : <PlusOutlined />}
{/* {loadding ? <LoadingOutlined /> : <PlusOutlined />} */}
<PlusOutlined />
<div className="ant-upload-text">Upload</div>
</div>
);
......@@ -167,7 +168,7 @@ const PictureOptionsRow = (props: any) => {
onRemove={onRemove} // 删除
beforeUpload={beforeUpload}
onChange={handleChange} // 点击上传
disabled={props.over}
disabled={props.over || props.overs}
>
{fileList.length >= limitNum || props.overs ? null : props.disabled ? null : uploadButton}
</Upload>
......
/*
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts
......@@ -51,7 +51,7 @@ export default {
message.error(`The information does not exist!`);
history.push('/AccountManagement/service');
} else {
console.log(playload);
// console.log(playload);
switch (playload.index) {
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 { message } from 'antd';
......
......@@ -116,6 +116,8 @@ const service = (props: any) => {
let t = { ...term, ...p };
setTerm(t);
RA(68, t, module, dispatch);
// console.log(page)
};
return (
......@@ -161,7 +163,7 @@ const service = (props: any) => {
};
function map(state: any) {
console.log(state);
// console.log(state);
const loading = state.loading.models.ServicePro;
const Init = state.Init;
const { Data, curString, village } = state[module];
......
/*
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
......@@ -21,12 +21,16 @@ import PictureOptionsRow from '@/components/PictureOptions/PictureOptionsRow';
import moment from 'moment';
import { getUrlPicName } from '@/utils/string';
const service = (props: any) => {
const { DataSave, dispatch, loading, match } = props;
const [term, setTerm] = useState(null as any); // 默认小区
const [ImageSrc, setImageSrc] = useState([] as any); // 图片地址
const [imgs, setImgs] = useState([] as any); // 回复地址
const [form] = Form.useForm();
// 监听是否有数据
useEffect(() => {
......@@ -50,6 +54,7 @@ const service = (props: any) => {
let a = DataSave.reportPictures.map((item: any, i: any) => {
let img = DataSave.reportImages.split(',');
let key = img[i];
return {
uid: i,
name: key,
......@@ -60,13 +65,35 @@ const service = (props: any) => {
// 图片列表
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]);
//onFinish 提交
const onFinish = (values: any) => {
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);
};
......@@ -137,6 +164,26 @@ const service = (props: any) => {
over={loading}
/>
</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}>
......
......@@ -127,7 +127,6 @@ const Account = (props: any) => {
// 编辑- 新增
const edit = (item: any) => {
console.log(item);
// 无论编辑还是新增都清掉二级账户选择
dispatch({ type: 'Account/InfoClear' });
if (item == 1) {
......
......@@ -31,6 +31,14 @@ const Detail = (props: any) => {
const [ModelExcel, setModelExcel] = useState(false);
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 是路由属性
useEffect(() => {
if (match) {
......@@ -328,7 +336,7 @@ const Detail = (props: any) => {
<Button
type="link"
onClick={() => {
openDows(require('@/assets/h5.png'), 'code.png');
openDows(codeUrl, 'code.png');
}}
>
Download
......@@ -338,12 +346,12 @@ const Detail = (props: any) => {
placeholder="Basic usage"
disabled
style={{ width: '280px' }}
value="http://47.74.233.180:8651/tosVisitorNo"
value={usage}
/>
<Button
type="link"
onClick={() => {
copy('http://47.74.233.180:8651/tosVisitorNo');
copy(usage);
}}
>
Copy
......
......@@ -26,6 +26,7 @@ export const getUrlPicName = (str: any) => {
} else {
var tmp = str.split('?');
var tmp2 = tmp[0].split('/');
// console.log(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