wangyue 2 years ago
parent
commit
6aba4d7aad
  1. 8
      api/app/lib/controllers/data/index.js
  2. 1
      api/app/lib/controllers/organization/department.js
  3. 11
      api/app/lib/controllers/report/index.js
  4. 2
      api/config.js
  5. 10
      scripts/0.0.1/data/4_file_type_data.sql
  6. 4
      weapp/src/config.js
  7. 154
      weapp/src/packages/patrol/index.jsx
  8. 5
      weapp/src/services/api.js
  9. 8
      web/client/src/sections/fillion/components/bridgeTable.js
  10. 4
      web/client/src/sections/fillion/components/highwaysTable.js
  11. 4
      web/client/src/sections/fillion/components/inforTable.js
  12. 15
      web/client/src/sections/fillion/components/maintenanceTable.js
  13. 25
      web/client/src/sections/fillion/components/operationalTable.js
  14. 15
      web/client/src/sections/fillion/components/patrolTable.js
  15. 3
      web/client/src/sections/fillion/components/protable.less
  16. 10
      web/client/src/sections/fillion/components/publicTable.js
  17. 16
      web/client/src/sections/fillion/components/transportationTable.js
  18. 22
      web/client/src/sections/fillion/containers/public.js
  19. 42
      web/client/src/sections/quanju/containers/footer/operation/right.js
  20. 2
      web/package.json

8
api/app/lib/controllers/data/index.js

@ -79,9 +79,13 @@ async function dataExport (ctx) {
const tableAttributes = models[modalOption.tableName].tableAttributes const tableAttributes = models[modalOption.tableName].tableAttributes
let header = [] let header = []
for (let k in tableAttributes) { for (let k in tableAttributes) {
if (k != 'id' && tableAttributes[k].comment) { const comment = tableAttributes[k].comment
if (k != 'id' && comment) {
if (comment == '品名' && municipalType == '出租车') {
continue
}
header.push({ header.push({
title: tableAttributes[k].comment || '-', title: comment || '-',
key: k, key: k,
index: tableAttributes[k].index, index: tableAttributes[k].index,
}) })

1
api/app/lib/controllers/organization/department.js

@ -89,6 +89,7 @@ async function editDep (ctx) {
where: { where: {
dependence: dependence || null, dependence: dependence || null,
name: name, name: name,
delete: false,
} }
}) })
if (repeatNameCount) { if (repeatNameCount) {

11
api/app/lib/controllers/report/index.js

@ -1,7 +1,7 @@
'use strict'; 'use strict';
const { QueryTypes } = require('sequelize'); const { QueryTypes } = require('sequelize');
async function reportList(ctx) { async function reportList (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { limit, page, startTime, endTime, keyword, userId, reportType, isTop } = ctx.query const { limit, page, startTime, endTime, keyword, userId, reportType, isTop } = ctx.query
@ -14,6 +14,7 @@ async function reportList(ctx) {
model: models.User, model: models.User,
attributes: ['name'] attributes: ['name']
}], }],
order: [['time', 'DESC']],
} }
if (limit) { if (limit) {
findOption.limit = limit findOption.limit = limit
@ -60,7 +61,7 @@ async function reportList(ctx) {
} }
} }
async function reportPosition(ctx) { async function reportPosition (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { startTime, endTime, userId, reportType } = ctx.query const { startTime, endTime, userId, reportType } = ctx.query
@ -110,7 +111,7 @@ async function reportPosition(ctx) {
} }
} }
async function reportDetail(ctx) { async function reportDetail (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { reportId } = ctx.params const { reportId } = ctx.params
@ -132,7 +133,7 @@ async function reportDetail(ctx) {
} }
} }
async function createReport(ctx) { async function createReport (ctx) {
try { try {
const { userId } = ctx.fs.api const { userId } = ctx.fs.api
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
@ -154,7 +155,7 @@ async function createReport(ctx) {
} }
} }
async function deleteReport(ctx) { async function deleteReport (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { reportId } = ctx.params; const { reportId } = ctx.params;

2
api/config.js

@ -52,7 +52,7 @@ const product = {
accessKey: QINIU_AK, accessKey: QINIU_AK,
secretKey: QINIU_SK secretKey: QINIU_SK
}, },
maxSize: 104857600, // 100M maxSize: 104857600 * 2, // 100M * 2
} }
}, { }, {
entry: require('./app').entry, entry: require('./app').entry,

10
scripts/0.0.1/data/4_file_type_data.sql

@ -0,0 +1,10 @@
-- ----------------------------
-- Records of file_type
-- ----------------------------
BEGIN;
INSERT INTO "public"."file_type" VALUES (1, '前期资料', NULL);
INSERT INTO "public"."file_type" VALUES (3, '竣工资料', NULL);
INSERT INTO "public"."file_type" VALUES (4, '维修资料', NULL);
INSERT INTO "public"."file_type" VALUES (5, '道路图片', NULL);
INSERT INTO "public"."file_type" VALUES (2, '施工资料', NULL);
COMMIT;

4
weapp/src/config.js

@ -9,10 +9,10 @@ const baseConfig = {
const development = { const development = {
// baseUrl: 'http://221.230.55.29:31919', // baseUrl: 'http://221.230.55.29:31919',
baseUrl: 'https://c5a6-117-90-37-10.ap.ngrok.io', baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
// webUrl: 'https://smartwater.anxinyun.cn', // webUrl: 'https://smartwater.anxinyun.cn',
// pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c', // pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',
imgUrl: 'http://test.resources.anxinyun.cn/', imgUrl: 'http://rfkimpwbb.hn-bkt.clouddn.com/',
// requestCache: true, //开启异步请求缓存 // requestCache: true, //开启异步请求缓存
...baseConfig ...baseConfig
}; };

154
weapp/src/packages/patrol/index.jsx

@ -4,10 +4,14 @@ import { View, RadioGroup, Radio, Image, Input, Picker } from '@tarojs/component
import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui'; import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui';
import InputPicker from '../components/inputPicker'; import InputPicker from '../components/inputPicker';
import request from '@/services/request'; import request from '@/services/request';
import { postReport, getReportDetail, delReport, getRoadSection } from '@/services/api'; import environment from '../../config';
import { getState } from '../../store/globalState';
import { postReport, getReportDetail, delReport, getRoadSection, postImage } from '@/services/api';
import './index.scss'; import './index.scss';
import arrowIcon from '../../static/img/patrol/arrow-down.svg'; import arrowIcon from '../../static/img/patrol/arrow-down.svg';
const { baseUrl, imgUrl } = environment;
const Index = () => { const Index = () => {
const userInfo = Taro.getStorageSync('userInfo') || {}; const userInfo = Taro.getStorageSync('userInfo') || {};
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false
@ -30,15 +34,20 @@ const Index = () => {
const [longitude, setLongitude] = useState(0) // const [longitude, setLongitude] = useState(0) //
const [latitude, setLatitude] = useState(0) // const [latitude, setLatitude] = useState(0) //
const [sceneImg, setSceneImg] = useState([]) // url
const [conserveBeforeImg, setConserveBeforeImg] = useState([]) //
const [conserveUnderwayImg, setConserveUnderwayImg] = useState([]) //
const [conserveAfterImg, setConserveAfterImg] = useState([]) //
const [sourceRoadSel, setSourceRoadSel] = useState([]) const [sourceRoadSel, setSourceRoadSel] = useState([])
const [sourceRoadStartSel, setSourceRoadStartSel] = useState([]) const [sourceRoadStartSel, setSourceRoadStartSel] = useState([])
const [sourceRoadEndSel, setSourceRoadEndSel] = useState([]) const [sourceRoadEndSel, setSourceRoadEndSel] = useState([])
const prjType = [ const prjType = [
{ text: '道路', value: 'road'}, { text: '道路', value: 'road' },
{ text: '桥梁', value: 'bridge'}, { text: '桥梁', value: 'bridge' },
{ text: '涵洞', value: 'culvert'}, { text: '涵洞', value: 'culvert' },
{ text: '其他', value: 'other'}, { text: '其他', value: 'other' },
] ]
const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他'] const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他']
const [roadStartSel, setRoadStartSel] = useState([]) const [roadStartSel, setRoadStartSel] = useState([])
@ -80,10 +89,10 @@ const Index = () => {
setRoadSectionEnd(data.roadSectionEnd) setRoadSectionEnd(data.roadSectionEnd)
setAddress(data.address) setAddress(data.address)
setContent(data.content) setContent(data.content)
setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: item })) : []) setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: imgUrl + item })) : [])
setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: item })) : []) setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: imgUrl + item })) : [])
setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: item })) : []) setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: imgUrl + item })) : [])
setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: item })) : []) setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: imgUrl + item })) : [])
} else { } else {
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' }) Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' })
} }
@ -162,6 +171,10 @@ const Index = () => {
Taro.showToast({ title: '工程类型错误', icon: 'none' }) Taro.showToast({ title: '工程类型错误', icon: 'none' })
return return
} }
if (content.length > 50) {
Taro.showToast({ title: '内容字数不能超过50', icon: 'none' })
return
}
const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)].value const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)].value
let data = { let data = {
@ -176,11 +189,11 @@ const Index = () => {
latitude latitude
} }
if (reportType === 'patrol') { if (reportType === 'patrol') {
data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null data['scenePic'] = sceneImg
} else { } else {
data['conserveBeforePic'] = conserveBeforePic.length > 0 ? conserveBeforePic.map(item => item.url) : null data['conserveBeforePic'] = conserveBeforeImg
data['conserveUnderwayPic'] = conserveUnderwayPic.length > 0 ? conserveUnderwayPic.map(item => item.url) : null data['conserveUnderwayPic'] = conserveUnderwayImg
data['conserveAfterPic'] = conserveAfterPic.length > 0 ? conserveAfterPic.map(item => item.url) : null data['conserveAfterPic'] = conserveAfterImg
} }
Taro.showModal({ Taro.showModal({
@ -272,24 +285,97 @@ const Index = () => {
setReportType(e.detail.value) setReportType(e.detail.value)
} }
function handleImgChange(files, type) { function handleImgChange(files, operationType, index, type) {
switch (type) { if (operationType === 'remove') {
case 'scenePic': setImg(false)
setScenePic(files) }
break; function setImg(isAdd, url) {
case 'conserveBeforePic': switch (type) {
setConserveBeforePic(files) case 'scenePic':
break; let nextImg = sceneImg
case 'conserveUnderwayPic': if (isAdd) {
setConserveUnderwayPic(files) nextImg.push(url)
break; } else {
case 'conserveAfterPic': nextImg.splice(index, 1)
setConserveAfterPic(files) }
break; setSceneImg(nextImg)
default: setScenePic(files)
break; break;
case 'conserveBeforePic':
let nextConserveBeforeImg = conserveBeforeImg
if (isAdd) {
nextConserveBeforeImg.push(url)
} else {
nextConserveBeforeImg.splice(index, 1)
}
setConserveBeforeImg(nextConserveBeforeImg)
setConserveBeforePic(files)
break;
case 'conserveUnderwayPic':
let nextConserveUnderwayImg = conserveUnderwayImg
if (isAdd) {
nextConserveUnderwayImg.push(url)
} else {
nextConserveUnderwayImg.splice(index, 1)
}
setConserveUnderwayImg(nextConserveUnderwayImg)
setConserveUnderwayPic(files)
break;
case 'conserveAfterPic':
let nextConserveAfterImg = conserveAfterImg
if (isAdd) {
nextConserveAfterImg.push(url)
} else {
nextConserveAfterImg.splice(index, 1)
}
setConserveAfterImg(nextConserveAfterImg)
setConserveAfterPic(files)
break;
default:
break;
}
}
if (operationType === 'add' && files.length > 0) {
Taro.showLoading({ title: '上传中' })
let i = 0
switch (type) {
case 'scenePic':
i = scenePic.length
break;
case 'conserveBeforePic':
i = conserveBeforePic.length
break;
case 'conserveUnderwayPic':
i = conserveUnderwayPic.length
break;
case 'conserveAfterPic':
i = conserveAfterPic.length
break;
default:
break;
}
for (i; i < files.length; i++) {
const tempFilePaths = files[i].url
let token = getState('token') || Taro.getStorageSync('token')
Taro.uploadFile({
url: `${baseUrl}${postImage()}?token=${token}`,
filePath: tempFilePaths,
name: 'file',
success: (res) => {
if (i === files.length) {
Taro.hideLoading();
}
if (res.statusCode == 200) {
setImg(true, JSON.parse(res.data).key)
} else {
Taro.showToast({ title: '上传失败,请重试', icon: 'error' })
}
}
});
}
} }
} }
function handleImgClick(index, file) { function handleImgClick(index, file) {
Taro.previewImage({ Taro.previewImage({
urls: [file.url] // http urls: [file.url] // http
@ -397,7 +483,7 @@ const Index = () => {
<AtTextarea <AtTextarea
title='巡查内容:' title='巡查内容:'
placeholder={isView ? '' : '请输入巡查内容'} placeholder={isView ? '' : '请输入具体内容'}
value={content} value={content}
onChange={(v, e) => handleInput(e, 'content')} onChange={(v, e) => handleInput(e, 'content')}
disabled={isView} disabled={isView}
@ -419,7 +505,7 @@ const Index = () => {
count={3 - scenePic.length} count={3 - scenePic.length}
showAddBtn={scenePic.length >= 3 ? false : true} showAddBtn={scenePic.length >= 3 ? false : true}
files={scenePic} files={scenePic}
onChange={files => handleImgChange(files, 'scenePic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'scenePic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }
@ -442,7 +528,7 @@ const Index = () => {
count={3 - conserveBeforePic.length} count={3 - conserveBeforePic.length}
showAddBtn={conserveBeforePic.length >= 3 ? false : true} showAddBtn={conserveBeforePic.length >= 3 ? false : true}
files={conserveBeforePic} files={conserveBeforePic}
onChange={files => handleImgChange(files, 'conserveBeforePic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveBeforePic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }
@ -462,7 +548,7 @@ const Index = () => {
count={3 - conserveUnderwayPic.length} count={3 - conserveUnderwayPic.length}
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true} showAddBtn={conserveUnderwayPic.length >= 3 ? false : true}
files={conserveUnderwayPic} files={conserveUnderwayPic}
onChange={files => handleImgChange(files, 'conserveUnderwayPic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveUnderwayPic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }
@ -483,7 +569,7 @@ const Index = () => {
count={3 - conserveAfterPic.length} count={3 - conserveAfterPic.length}
showAddBtn={conserveAfterPic.length >= 3 ? false : true} showAddBtn={conserveAfterPic.length >= 3 ? false : true}
files={conserveAfterPic} files={conserveAfterPic}
onChange={files => handleImgChange(files, 'conserveAfterPic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveAfterPic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }

5
weapp/src/services/api.js

@ -37,6 +37,11 @@ export const getRoadSection = () => {
return `/road/section`; return `/road/section`;
}; };
// 上传图片
export const postImage = () => {
return `/attachments/report`;
};
//行业查询 //行业查询
export const getIndustryUrl = () => { export const getIndustryUrl = () => {
return `/elec/business/industry` return `/elec/business/industry`

8
web/client/src/sections/fillion/components/bridgeTable.js

@ -1534,13 +1534,13 @@ const BrideTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1717,13 +1717,13 @@ const BrideTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>

4
web/client/src/sections/fillion/components/highwaysTable.js

@ -37,6 +37,7 @@ const hightModal = (type, record) => {
dataIndex: 'placeName', dataIndex: 'placeName',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
search: false,
options: 1, options: 1,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
fieldProps: { fieldProps: {
@ -91,6 +92,9 @@ const hightModal = (type, record) => {
actionRef={ref} actionRef={ref}
scroll={{ x: 800 }} scroll={{ x: 800 }}
options={false} options={false}
form={{
submitter:false
}}
// ref={c => { finishedProductTable = c; }} // ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' rowKey='id'

4
web/client/src/sections/fillion/components/inforTable.js

@ -381,13 +381,13 @@ const InForTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>

15
web/client/src/sections/fillion/components/maintenanceTable.js

@ -119,7 +119,7 @@ const DetailList = (props) => {
} }
}, },
{ {
title: '缺陷名称', title: '具体内容',
key: 'content', key: 'content',
dataIndex: 'content', dataIndex: 'content',
align: 'center' align: 'center'
@ -191,7 +191,14 @@ const DetailList = (props) => {
const PatrolNameList = (props) => { const PatrolNameList = (props) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props; const { onChange, record, userList, loading } = props;
const { name } = record || { name: '' } const [selectRoad, setSelectRoad] = useState();
useEffect(() => {
if (userList && userList instanceof Array && userList.length) {
setSelectRoad(userList[0].id)
// onChange(userList[0]);
}
}, [userList])
const columns = [ const columns = [
{ {
title: '巡更人员', title: '巡更人员',
@ -230,7 +237,7 @@ const PatrolNameList = (props) => {
loading={loading} loading={loading}
rowKey="name" rowKey="name"
rowClassName={(record) => { rowClassName={(record) => {
return record.patrolName === name ? styles['split-row-select-active'] : ''; return record.id == selectRoad ? 'list-row-actived' : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Input placeholder='输入养护人员名称' onChange={doUserNameSearch} ></Input> <Input placeholder='输入养护人员名称' onChange={doUserNameSearch} ></Input>
@ -242,7 +249,7 @@ const PatrolNameList = (props) => {
return { return {
onClick: () => { onClick: () => {
if (record) { if (record) {
console.log('record:', record) setSelectRoad(record.id);
onChange(record); onChange(record);
} }
}, },

25
web/client/src/sections/fillion/components/operationalTable.js

@ -723,7 +723,7 @@ const OperaTionalTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -731,7 +731,7 @@ const OperaTionalTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1356,7 +1356,7 @@ const OperaTionalTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1364,7 +1364,7 @@ const OperaTionalTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1826,7 +1826,7 @@ const OperaTionalTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1834,7 +1834,7 @@ const OperaTionalTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1848,6 +1848,9 @@ const OperaTionalTable = (props) => {
<div className='protable-transpor'> <div className='protable-transpor'>
<ProTable <ProTable
actionRef={ref} actionRef={ref}
form={{
submitter: rewkeys === 'keyun' ? false : true,
}}
toolbar={{ toolbar={{
multipleLine: true, multipleLine: true,
@ -1887,8 +1890,8 @@ const OperaTionalTable = (props) => {
}, { }, {
key: 'tab4', key: 'tab4',
label: <span onClick={() => { label: <span onClick={() => {
setDifferentiate('business') setDifferentiate('business')
setRewkeys('yehu') setRewkeys('yehu')
}}>业户{activeKey === 'tab4'}</span>, }}>业户{activeKey === 'tab4'}</span>,
}, },
@ -1900,7 +1903,9 @@ const OperaTionalTable = (props) => {
ref={c => { finishedProductTable = c; }} ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' rowKey='id'
rowSelection={{ // alwaysShowAlert
// tableAlertRender={true}
rowSelection={ rewkeys=='keyun'?false:{
selectedRowKeys: rowSelected, selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => { onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys); setRowSelected(selectedRowKeys);
@ -1966,7 +1971,7 @@ const OperaTionalTable = (props) => {
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,differentiate,genre) }}> ['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, differentiate, genre) }}>
<Button <Button
> >
导出 导出

15
web/client/src/sections/fillion/components/patrolTable.js

@ -122,7 +122,7 @@ const DetailList = (props) => {
} }
}, },
{ {
title: '缺陷名称', title: '具体内容',
key: 'content', key: 'content',
dataIndex: 'content', dataIndex: 'content',
align: 'center' align: 'center'
@ -194,7 +194,15 @@ const DetailList = (props) => {
const PatrolNameList = (props) => { const PatrolNameList = (props) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props; const { onChange, record, userList, loading } = props;
const { name } = record || { name: '' } const [selectRoad, setSelectRoad] = useState();
useEffect(() => {
if (userList && userList instanceof Array && userList.length) {
setSelectRoad(userList[0].id)
// onChange(userList[0]);
}
}, [userList])
const columns = [ const columns = [
{ {
title: '巡更人员', title: '巡更人员',
@ -232,7 +240,7 @@ const PatrolNameList = (props) => {
loading={loading} loading={loading}
rowKey="name" rowKey="name"
rowClassName={(record) => { rowClassName={(record) => {
return record.patrolName === name ? styles['split-row-select-active'] : ''; return record.id == selectRoad ? 'list-row-actived' : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Input placeholder='输入巡更人员名称' onChange={doUserNameSearch} ></Input> <Input placeholder='输入巡更人员名称' onChange={doUserNameSearch} ></Input>
@ -245,6 +253,7 @@ const PatrolNameList = (props) => {
onClick: () => { onClick: () => {
if (record) { if (record) {
// console.log('record:', record) // console.log('record:', record)
setSelectRoad(record.id);
onChange(record); onChange(record);
} }
}, },

3
web/client/src/sections/fillion/components/protable.less

@ -10,8 +10,9 @@
} }
.list-row-actived { .list-row-actived {
background-color: #7cafc6; background-color: #e2f6ff;
font-weight: 600; font-weight: 600;
color: #1E80FF
} }

10
web/client/src/sections/fillion/components/publicTable.js

@ -434,7 +434,7 @@ const PublicTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -442,7 +442,7 @@ const PublicTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1129,7 +1129,7 @@ const PublicTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1137,7 +1137,7 @@ const PublicTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1231,7 +1231,7 @@ const PublicTable = (props) => {
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}> <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,rewkeys ) }}>
<Button <Button
> >
导出 导出

16
web/client/src/sections/fillion/components/transportationTable.js

@ -1208,7 +1208,7 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1216,7 +1216,7 @@ const TransporTationTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
); );
}, },
@ -2363,7 +2363,7 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -2371,7 +2371,7 @@ const TransporTationTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -3519,7 +3519,7 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -3527,7 +3527,7 @@ const TransporTationTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -3706,13 +3706,13 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>

22
web/client/src/sections/fillion/containers/public.js

@ -9,17 +9,21 @@ const Public = (props) => {
const [data, setData] = useState() const [data, setData] = useState()
useEffect(() => { useEffect(() => {
// dispatch(getDepMessage()) // dispatch(getDepMessage())
setData(props) setData(props)
}, []); }, []);
//批量导出 //批量导出
const exports = (ids,counts) => { const exports = (ids, rewkeys) => {
console.log(counts); let idas = ids.toString()
let idas=ids.toString() if (rewkeys === 'xianlu') {
window.open( window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`) '/_api/' + `data/export/?ids=${idas || ''}&exp=${'busLine'}&token=${user.token}`)
}
} if (rewkeys === 'cheliang') {
window.open(
'/_api/' + `data/export/?ids=${idas || ''}&exp=${'busCar'}&token=${user.token}`)
}
}
return ( return (
<> <PublicTable data={data} exports={exports} /> <> <PublicTable data={data} exports={exports} />
</> </>

42
web/client/src/sections/quanju/containers/footer/operation/right.js

@ -1,32 +1,32 @@
import React, { useState } from 'react' import React, { useState } from 'react'
import { Carousel } from 'antd'; // import { Carousel } from 'antd';
import Module from '../../public/module' import Module from '../../public/module'
const Right = () => { const Right = () => {
const [dataLists, setDataList] = useState([ // const [dataLists, setDataList] = useState([
{ // {
route: '147', // route: '147',
plate: '赣APJ090' // plate: '赣APJ090'
}, { // }, {
route: '166', // route: '166',
plate: '赣APJ087' // plate: '赣APJ087'
}, { // }, {
route: '171', // route: '171',
plate: '赣APJ184' // plate: '赣APJ184'
}, { // }, {
route: '186', // route: '186',
plate: '赣APJ241' // plate: '赣APJ241'
}, { // }, {
route: '199', // route: '199',
plate: '赣APJ337' // plate: '赣APJ337'
} // }
]) // ])
const style = { height: "97%", marginTop: "3%" } const style = { height: "97%", marginTop: "3%" }
return ( return (
<div style={{ position:'absolute',right:0, width: "23%", height: "100%", marginRight: "1%", }}> <div style={{ position:'absolute',right:0, width: "23%", height: "100%", marginRight: "1%", }}>
<Module style={style} customize={true} title={"车辆视频监控"}> <Module style={style} customize={true} title={"车辆视频监控"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}> <div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<Carousel {/* <Carousel
autoplay autoplay
infinite infinite
autoplaySpeed={300000} autoplaySpeed={300000}
@ -62,7 +62,7 @@ const Right = () => {
</div> </div>
)) ))
} }
</Carousel> </Carousel> */}
</div> </div>
</Module> </Module>
</div> </div>

2
web/package.json

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"test": "mocha", "test": "mocha",
"start": "cross-env NODE_ENV=development npm run start-params", "start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5000 -u http://localhost:4000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com", "start-params": "node server -p 5000 -u http://localhost:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server",
"build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",

Loading…
Cancel
Save