diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json
index 0e5cef4..daf8ebb 100644
--- a/api/.vscode/launch.json
+++ b/api/.vscode/launch.json
@@ -15,7 +15,8 @@
"args": [
"-p 4900",
// 研发
- "-g postgres://FashionAdmin:123456@10.8.30.39:5432/Inspection",
+ // "-g postgres://FashionAdmin:123456@10.8.30.39:5432/Inspection",
+ "-g postgres://postgres:123456@10.8.16.184:5432/XunJian",
// "-g postgres://FashionAdmin:123456@10.8.30.156:5432/inspection",
// 测试
// "--apiEmisUrl http://10.8.30.161:1111",
diff --git a/api/app/lib/models/patrol_record_issue_handle.js b/api/app/lib/models/patrol_record_issue_handle.js
index 99bb99c..c0a73ca 100644
--- a/api/app/lib/models/patrol_record_issue_handle.js
+++ b/api/app/lib/models/patrol_record_issue_handle.js
@@ -168,6 +168,42 @@ module.exports = dc => {
field: "check_image",
autoIncrement: false
},
+ yanshoushijian: {
+ type: DataTypes.DATE,
+ allowNull: true,
+ defaultValue: null,
+ comment: null,
+ primaryKey: false,
+ field: "yanshoushijian",
+ autoIncrement: false
+ },
+ yanshoucishu: {
+ type: DataTypes.INTEGER,
+ allowNull: true,
+ defaultValue: null,
+ comment: null,
+ primaryKey: false,
+ field: "yanshoucishu",
+ autoIncrement: false
+ },
+ yujingshijian: {
+ type: DataTypes.DATE,
+ allowNull: true,
+ defaultValue: null,
+ comment: null,
+ primaryKey: false,
+ field: "yujingshijian",
+ autoIncrement: false
+ },
+ isgaojing: {
+ type: DataTypes.BOOLEAN,
+ allowNull: true,
+ defaultValue: null,
+ comment: null,
+ primaryKey: false,
+ field: "isgaojing",
+ autoIncrement: false
+ },
}, {
tableName: "patrol_record_issue_handle",
comment: "",
diff --git a/api/log/development.log b/api/log/development.log
index 5394c5f..f052f00 100644
--- a/api/log/development.log
+++ b/api/log/development.log
@@ -4194,3 +4194,129 @@ notNull Violation: PatrolPlan.patrolCount cannot be null
2023-02-21 17:02:47.295 - error: path: /patrolTemplate, error: ReferenceError: createUser is not defined
2023-02-21 17:08:28.472 - error: path: /patrolTemplate, error: ReferenceError: createUser is not defined
2023-02-21 17:08:39.999 - error: path: /patrolTemplate, error: ReferenceError: createUser is not defined
+2023-03-03 08:50:15.221 - debug: [FS-LOGGER] Init.
+2023-03-03 08:50:16.170 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-03 08:50:16.171 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-03 08:50:16.171 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-03 08:52:27.130 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:27.133 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:27.133 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:27.134 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:27.134 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:27.135 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:48.235 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:48.236 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:48.237 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:48.238 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:48.238 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:52:48.239 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:53:09.296 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:53:09.296 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:53:09.296 - error: [FS-ERRHD]
+{
+ message: 'transaction is not defined',
+ stack: 'ReferenceError: transaction is not defined\n' +
+ ' at login (d:\\前端学习\\巡检\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:78:9)'
+}
+2023-03-03 08:55:19.376 - debug: [FS-LOGGER] Init.
+2023-03-03 08:55:19.504 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-03 08:55:19.505 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-03 08:55:19.505 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-04 15:30:48.068 - debug: [FS-LOGGER] Init.
+2023-03-04 15:30:49.010 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-04 15:30:49.011 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-04 15:30:49.011 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-04 17:42:25.123 - debug: [FS-LOGGER] Init.
+2023-03-04 17:42:25.236 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-04 17:42:25.236 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-04 17:42:25.236 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-04 18:22:09.556 - debug: [FS-LOGGER] Init.
+2023-03-04 18:22:09.675 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-04 18:22:09.676 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-04 18:22:09.676 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-06 08:51:30.658 - debug: [FS-LOGGER] Init.
+2023-03-06 08:51:31.673 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-06 08:51:31.674 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-06 08:51:31.674 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-06 10:16:04.533 - debug: [FS-LOGGER] Init.
+2023-03-06 10:16:04.663 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-06 10:16:04.663 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-06 10:16:04.663 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-06 14:30:39.123 - debug: [FS-LOGGER] Init.
+2023-03-06 14:30:39.248 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-06 14:30:39.248 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-06 14:30:39.248 - info: [FS-AUTH] Inject auth and api mv into router.
+2023-03-06 14:32:05.704 - debug: [FS-LOGGER] Init.
+2023-03-06 14:32:05.817 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2023-03-06 14:32:05.817 - debug: init fs.attachment and inject it into app(app.fs.attachment) and runtime ctx(ctx.fs.attachment)
+2023-03-06 14:32:05.818 - info: [FS-AUTH] Inject auth and api mv into router.
diff --git a/script/1.0.4/schema/3.updata_resource.sql b/script/1.0.4/schema/3.updata_resource.sql
new file mode 100644
index 0000000..54bc14f
--- /dev/null
+++ b/script/1.0.4/schema/3.updata_resource.sql
@@ -0,0 +1,2 @@
+DELETE FROM public.resource WHERE code = 'REPAIR_MANAGE';
+DELETE FROM public.resource WHERE parent_resource = 'REPAIR_MANAGE';
\ No newline at end of file
diff --git a/script/1.0.4/schema/4.updata_patrol_record_issue__handle.sql b/script/1.0.4/schema/4.updata_patrol_record_issue__handle.sql
new file mode 100644
index 0000000..d5ac8f5
--- /dev/null
+++ b/script/1.0.4/schema/4.updata_patrol_record_issue__handle.sql
@@ -0,0 +1,4 @@
+ALTER TABLE patrol_record_issue_handle ADD yanshoushijian timestamp(6);
+ALTER TABLE patrol_record_issue_handle ADD yanshoucishu integer;
+ALTER TABLE patrol_record_issue_handle ADD yujingshijian timestamp(6);
+ALTER TABLE patrol_record_issue_handle ADD isgaojing bool;
diff --git a/weapp/package/troubleshooting/shootingForm/index.js b/weapp/package/troubleshooting/shootingForm/index.js
index aa54940..cd18784 100644
--- a/weapp/package/troubleshooting/shootingForm/index.js
+++ b/weapp/package/troubleshooting/shootingForm/index.js
@@ -228,15 +228,15 @@ Page({
return;
}
wx.chooseMedia({
- count: 20, // 基础库2.25.0前,最多可支持9个文件,2.25.0及以后最多可支持20个文件
+ count: 20, // 基础库2.25.0前,最多可支持9个文件,2.25.0及以后最多可支持20个文件
mediaType: ['image'], // 文件类型
- sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有
- sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有
+ sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有
+ sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有
success: function (res) {
const imgs = res.tempFiles;
for (let i = 0; i < imgs.length; i++) {
if (res.tempFiles[i].size > 15728640) {
- wx.showToast({ title: '图片大于15M,不可上传', icon: 'none' });
+ wx.showToast({ title: '图片大于15M,不可上传', icon: 'none' });
return;
}
const fileNameArr = res.tempFiles[i].tempFilePath.split('.');
@@ -273,7 +273,7 @@ Page({
success: (resp) => {
wx.hideLoading();
success++;
- let str = JSON.parse(resp.data) // 返回的结果,可能不同项目结果不一样
+ let str = JSON.parse(resp.data) // 返回的结果,可能不同项目结果不一样
str = str.uploaded
if (imgs.length >= 20) {
return false;
@@ -291,14 +291,14 @@ Page({
},
complete: () => {
i++;
- if (i == data.path.length) { // 当图片传完时,停止调用
+ if (i == data.path.length) { // 当图片传完时,停止调用
console.log('执行完毕');
- console.log('成功:' + success + " 失败:" + fail);
- } else { // 若图片还没有传完,则继续调用函数
+ console.log('成功:' + success + " 失败:" + fail);
+ } else { // 若图片还没有传完,则继续调用函数
data.i = i;
data.success = success;
data.fail = fail;
- that.uploadimg(data, itemName); // 递归,回调自己
+ that.uploadimg(data, itemName); // 递归,回调自己
}
}
});
diff --git a/weapp/package/troubleshooting/shootingForm/index.wxml b/weapp/package/troubleshooting/shootingForm/index.wxml
index a58ff4e..b11402e 100644
--- a/weapp/package/troubleshooting/shootingForm/index.wxml
+++ b/weapp/package/troubleshooting/shootingForm/index.wxml
@@ -14,7 +14,7 @@
-
+
diff --git a/web/client/src/app.js b/web/client/src/app.js
index 1597273..e737fac 100644
--- a/web/client/src/app.js
+++ b/web/client/src/app.js
@@ -8,7 +8,7 @@ import ProjectRegime from './sections/projectRegime';
import Organization from './sections/organization';
import PatrolManage from './sections/patrolManage';
import IssueHandle from './sections/issueHandle'
-
+import { Func } from '$utils';
const App = props => {
const { projectName } = props
diff --git a/web/client/src/sections/auth/containers/login.js b/web/client/src/sections/auth/containers/login.js
index dcba5df..5ca98ad 100644
--- a/web/client/src/sections/auth/containers/login.js
+++ b/web/client/src/sections/auth/containers/login.js
@@ -11,7 +11,7 @@ import { login, LOGIN_ERROR } from '../actions/auth';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Uploads } from '$components'
import { LockOutlined, UserOutlined } from '@ant-design/icons';
-
+import { Func } from '$utils';
import '../style.less';
const FormItem = Form.Item;
@@ -29,6 +29,43 @@ const Login = props => {
const [codCountDown, setCodeCountDown] = useState(60)
const codCountDownRef = useRef(0)
const [form] = Form.useForm();
+
+ const tourl = () => {
+ if (Func.isAuthorized("STRU_INFO_CONFIG")) {
+ return '/projectRegime/information'
+ }
+ if (Func.isAuthorized("QR_CODE_CONFIG")) {
+ return '/projectRegime/qrCode'
+ }
+ if (Func.isAuthorized("USER_CONFIG")) {
+ return '/organization/user'
+ }
+ if (Func.isAuthorized("AUTH_CONFIG")) {
+ return '/organization/authority'
+ }
+ if (Func.isAuthorized("PATROL_PLAN_CONFIG")) {
+ return '/patrolManage/patrolPlan'
+ }
+ if (Func.isAuthorized("PATROL_RECORD_VIEW")) {
+ return '/patrolManage/patrolRecord'
+ }
+ if (Func.isAuthorized("CHECKREPORT")) {
+ return '/patrolManage/patrolReport'
+ }
+ if (Func.isAuthorized("CHECKITEMSET")) {
+ return '/patrolManage/checkItems'
+}
+if (Func.isAuthorized("CHECKMOULD")) {
+ return '/patrolManage/patrolTemplate'
+}
+if (Func.isAuthorized("WENTICHULI")) {
+ return '/issueHandle'
+}
+ else {
+ return message.warn('没有任何模块的查看权限')
+ }
+ }
+
useEffect(() => {
}, [])
@@ -36,7 +73,7 @@ const Login = props => {
useEffect(() => {
if (user && user.authorized) {
- dispatch(push('/projectRegime/information'));
+ dispatch(push(tourl()));
}
}, [user])
diff --git a/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js b/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
index 49c41cb..0b799b6 100644
--- a/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
+++ b/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
@@ -273,7 +273,7 @@ export default (props) => {
{/*问题处理计划表单*/}
{
- ((editData?.patrolRecordIssueHandles[0].state == 1 && title != '查看详情') || editData?.patrolRecordIssueHandles[0].state > 1) &&
+ ((editData?.patrolRecordIssueHandles[0]?.state == 1 && title != '查看详情') || editData?.patrolRecordIssueHandles[0]?.state > 1) &&
<>
{"维修计划信息"}
diff --git a/web/client/src/sections/patrolManage/components/planModal.js b/web/client/src/sections/patrolManage/components/planModal.js
index 8eaa551..d4a1168 100644
--- a/web/client/src/sections/patrolManage/components/planModal.js
+++ b/web/client/src/sections/patrolManage/components/planModal.js
@@ -33,7 +33,7 @@ const PlanModal = ({ visible, onCreate, onCancel, dispatch, userLoading, userLis
useEffect(() => {
if (userList.length) {
- setUserOpt(userList.map(u => ({ label: u.name, value: u.id })))
+ setUserOpt(userList?.filter(f => f.structure?.includes(curRecord?.project?.id))?.map(u => ({ label: u.name, value: u.id })))
}
}, [userList])
@@ -104,13 +104,15 @@ const PlanModal = ({ visible, onCreate, onCancel, dispatch, userLoading, userLis
{ required: true, message: '请选择结构物' },
]}
>
-