From f0a322f51c4465fadb56f517826dd44062f4006f Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期三, 10 十二月 2025 11:57:12 +0800
Subject: [PATCH] 抓拍配置修改
---
/dev/null | 61 -----
fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/snapConf.html | 92 ++++++++
fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js | 2
fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolConf/patrolConf.html | 14
fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/add.html | 85 +++++++
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SnapConfController.java | 136 ++++++++++++
fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/edit.html | 83 +++++++
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java | 98 +++++---
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/security/SnapConfManager.java | 66 ++++++
9 files changed, 528 insertions(+), 109 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java
index ffb5ba9..2da2fd1 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapConfService.java
@@ -6,6 +6,7 @@
import com.fzzy.igds.domain.SnapConf;
import com.fzzy.igds.mapper.SnapConfMapper;
import com.fzzy.igds.utils.ContextUtil;
+import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -22,63 +23,82 @@
private SnapConfMapper snapConfMapper;
/**
- * 鏌ヨ鎵�鏈夋暟鎹�
+ * 鏌ヨ鍒楄〃鏁版嵁
*
- * @param param
- * @author sgj
- * @date 2025/12/10
+ * @param param 鏌ヨ鍙傛暟
+ * @return 鏁版嵁鍒楄〃
*/
- public List<SnapConf> listAll(IgdsBaseParam param) {
-
- if (null == param)
- return snapConfMapper.selectList(null);
-
- QueryWrapper<SnapConf> queryWrapper = new QueryWrapper<>();
- if (StringUtils.isNotEmpty(param.getName())) {
- queryWrapper.like("name", param.getName());
- }
+ public List<SnapConf> selectList(SnapConf param) {
+ QueryWrapper<SnapConf> queryWrapper = getQueryWrapper(param);
return snapConfMapper.selectList(queryWrapper);
}
/**
- * 鏂板鏁版嵁
+ * 灏佽鏌ヨ鏉′欢
*
- * @param snapConf
- * @author sgj
- * @date 2025/12/10
+ * @param param 鏌ヨ鍙傛暟
+ * @return 鏌ヨ鏋勯�犲櫒
*/
- public BaseResp addData(SnapConf snapConf) {
- snapConf.setId(ContextUtil.generateId());
- snapConf.setCompanyId(ContextUtil.getCompanyId());
- snapConf.setUpdateBy(ContextUtil.getLoginUserName());
- snapConf.setUpdateTime(new Date());
- snapConf.setCreateBy(ContextUtil.getLoginUserName());
- snapConf.setCreateTime(new Date());
- return snapConfMapper.insert(snapConf) > 0 ? BaseResp.success() : BaseResp.error("娣诲姞澶辫触");
+ public QueryWrapper<SnapConf> getQueryWrapper(SnapConf param) {
+ QueryWrapper<SnapConf> queryWrapper = new QueryWrapper<>();
+
+ // 璁剧疆鍏徃ID骞朵綔涓烘煡璇㈡潯浠�
+ param.setCompanyId(ContextUtil.getCompanyId());
+ queryWrapper.eq("company_id", param.getCompanyId());
+
+ // 鎸夊垱寤烘椂闂村�掑簭鎺掑簭
+ queryWrapper.orderByDesc("create_time");
+
+ return queryWrapper;
}
/**
- * 鏇存柊鏁版嵁
+ * 鏍规嵁ID鏌ヨ璇︽儏
*
- * @param snapConf
- * @author sgj
- * @date 2025/12/10
+ * @param id 涓婚敭ID
+ * @return 瀹炰綋瀵硅薄
*/
- public BaseResp updateData(SnapConf snapConf) {
- snapConf.setUpdateBy(ContextUtil.getLoginUserName());
- snapConf.setUpdateTime(new Date());
- return snapConfMapper.updateById(snapConf) > 0 ? BaseResp.success() : BaseResp.error("鏇存柊澶辫触");
+ public SnapConf selectById(String id) {
+ return snapConfMapper.selectById(id);
}
/**
- * 鍒犻櫎鏁版嵁
+ * 鎻掑叆鏂版暟鎹�
*
- * @param snapConf
- * @author sgj
- * @date 2025/12/10
+ * @param param 鏁版嵁瀹炰綋
+ * @return 褰卞搷琛屾暟
*/
- public BaseResp deleteData(SnapConf snapConf) {
- return snapConfMapper.deleteById(snapConf) > 0 ? BaseResp.success() : BaseResp.error("鍒犻櫎澶辫触");
+ public int insertData(SnapConf param) {
+ param.setId(ContextUtil.generateId());
+ param.setCompanyId(ContextUtil.getCompanyId());
+ param.setUpdateBy(ContextUtil.getLoginUserName());
+ param.setUpdateTime(new Date());
+ param.setCreateBy(ContextUtil.getLoginUserName());
+ param.setCreateTime(new Date());
+ return snapConfMapper.insert(param);
}
+ /**
+ * 鏇存柊宸叉湁鏁版嵁
+ *
+ * @param param 鏁版嵁瀹炰綋
+ * @return 褰卞搷琛屾暟
+ */
+ public int updateData(SnapConf param) {
+ param.setUpdateBy(ContextUtil.getLoginUserName());
+ param.setUpdateTime(new Date());
+ return snapConfMapper.updateById(param);
+ }
+
+ /**
+ * 鍒犻櫎鎸囧畾ID鐨勬暟鎹�
+ *
+ * @param ids 瑕佸垹闄ょ殑璁板綍ID闆嗗悎锛堥�楀彿鍒嗛殧锛�
+ */
+ public void deleteDataById(String ids) {
+ String[] recordIds = Convert.toStrArray(ids);
+ for (String recordId : recordIds) {
+ snapConfMapper.deleteById(recordId);
+ }
+ }
}
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml
deleted file mode 100644
index d1182db..0000000
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConf.view.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ViewConfig>
- <Arguments/>
- <Context/>
- <Model/>
- <View layout="padding:10">
- <ClientEvent name="onClick">
-/**
-* 鏌ヨ
-*/
-query = function(){
- view.get("#dsMain").flushAsync();
-}
</ClientEvent>
- <Property name="packages">font-awesome,css-common</Property>
- <DataSet id="dsMain">
- <Property name="loadMode">lazy</Property>
- <Property name="dataType">[dtSnapConf]</Property>
- <Property name="dataProvider">snapConfPR#listAll</Property>
- </DataSet>
- <DataSet id="dsParam">
- <ClientEvent name="onReady">self.insert({});</ClientEvent>
- <Property name="dataType">dtBaseParam</Property>
- </DataSet>
- <Container>
- <Property name="className">c-param</Property>
- <AutoForm>
- <Property name="cols">*,90,90,*,*</Property>
- <Property name="dataSet">dsParam</Property>
- <Property name="labelAlign">right</Property>
- <Property name="labelWidth">100</Property>
- <AutoFormElement>
- <Property name="name">deptId</Property>
- <Property name="property">deptId</Property>
- <Editor/>
- </AutoFormElement>
- <Button>
- <ClientEvent name="onClick">var param = view.get("#dsParam.data");
-console.log("param",param);
-view.get("#dsMain").set("parameter",param).flushAsync();
-</ClientEvent>
- <Property name="caption">鎼滅储</Property>
- <Property name="iconClass">fa fa-search</Property>
- <Property name="exClassName">btn-q1</Property>
- </Button>
- <Button>
- <ClientEvent name="onClick">view.get("#dsParam").set("data",{});</ClientEvent>
- <Property name="caption">閲嶇疆</Property>
- <Property name="exClassName">btn-q2</Property>
- <Property name="iconClass">fa fa-refresh</Property>
- </Button>
- </AutoForm>
- </Container>
- <Container>
- <Property name="className">c-data</Property>
- <ToolBar>
- <ToolBarButton>
- <ClientEvent name="onClick">view.get("#dsMain").insert({});
-view.get("#dialogMain").show();
-</ClientEvent>
- <Property name="caption">鏂板</Property>
- <Property name="exClassName">btn1</Property>
- <Property name="width">100</Property>
- <Property name="iconClass">fa fa-plus</Property>
- </ToolBarButton>
- <ToolBarButton>
- <ClientEvent name="onClick">var data = view.get("#dgMain").get("selection");
-view.get("#dialogMain").show();
- </ClientEvent>
- <Property name="id">btnUpdate</Property>
- <Property name="caption">淇敼</Property>
- <Property name="exClassName">btn2</Property>
- <Property name="width">100</Property>
- <Property name="iconClass">fa fa-pencil-square-o</Property>
- </ToolBarButton>
- <ToolBarButton>
- <ClientEvent name="onClick">var data = view.get("#dgMain").get("selection")
-if(!data){
- $alert("璇烽�夋嫨鏁版嵁");
- }else{
- view.get("#ajaxDelData").set("parameter", data).execute(function(result){
- if("200"!=result.code){
- $alert("寮傚父淇℃伅锛�"+result.message);
- }else{
- $notify("鎵ц鎴愬姛");
- query();
- }
- })
-}</ClientEvent>
- <Property name="caption">鍒犻櫎</Property>
- <Property name="exClassName">btn3</Property>
- <Property name="width">100</Property>
- <Property name="iconClass">fa fa-times</Property>
- </ToolBarButton>
- </ToolBar>
- <DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow">
- <ClientEvent name="onDataRowClick">self.set("selection", arg.data)</ClientEvent>
- <Property name="dataSet">dsMain</Property>
- <Property name="readOnly">true</Property>
- <RowSelectorColumn/>
- <RowNumColumn/>
- <DataColumn name="deptId">
- <Property name="property">deptId</Property>
- </DataColumn>
- <DataColumn name="cameraId">
- <Property name="property">cameraId</Property>
- </DataColumn>
- <DataColumn name="actHour1">
- <Property name="property">actHour1</Property>
- </DataColumn>
- <DataColumn name="actHour2">
- <Property name="property">actHour2</Property>
- </DataColumn>
- <DataColumn name="actHour3">
- <Property name="property">actHour3</Property>
- </DataColumn>
- </DataGrid>
- </Container>
- <Dialog id="dialogMain" layout="regionPadding:8">
- <Property name="closeable">false</Property>
- <Property name="caption">鎶撴媿閰嶇疆</Property>
- <Property name="width">1200</Property>
- <Property name="iconClass">fa fa-tasks</Property>
- <Buttons>
- <Button id="btnOk">
- <ClientEvent name="onClick">view.get("#saveAction").execute(function(){
- self.get("parent").hide();
-});</ClientEvent>
- <Property name="caption">淇濆瓨</Property>
- <Property name="iconClass">fa fa-check-circle</Property>
- <Property name="exClassName">btn1</Property>
- <Property name="width">120</Property>
- </Button>
- <Button>
- <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
- self.get("parent").hide();</ClientEvent>
- <Property name="caption">鍙栨秷</Property>
- <Property name="exClassName">btn3</Property>
- <Property name="iconClass">fa fa-times-circle</Property>
- <Property name="width">120</Property>
- </Button>
- </Buttons>
- <Children>
- <Container>
- <AutoForm>
- <Property name="dataSet">dsMain</Property>
- <Property name="cols">*,*,*</Property>
- <Property name="labelAlign">right</Property>
- <Property name="labelSeparator">锛�</Property>
- <Property name="labelWidth">120</Property>
- <AutoFormElement>
- <Property name="name">deptId</Property>
- <Property name="property">deptId</Property>
- <Editor/>
- </AutoFormElement>
- <AutoFormElement>
- <Property name="name">cameraId</Property>
- <Property name="property">cameraId</Property>
- <Editor/>
- </AutoFormElement>
- <AutoFormElement>
- <Property name="name">actHour1</Property>
- <Property name="property">actHour1</Property>
- <Editor/>
- </AutoFormElement>
- <AutoFormElement>
- <Property name="name">actHour2</Property>
- <Property name="property">actHour2</Property>
- <Editor/>
- </AutoFormElement>
- <AutoFormElement>
- <Property name="name">actHour3</Property>
- <Property name="property">actHour3</Property>
- <Editor/>
- </AutoFormElement>
- </AutoForm>
- </Container>
- </Children>
- <Tools/>
- </Dialog>
- <UpdateAction id="saveAction">
- <Property name="dataResolver">snapConfPR#saveUpdate</Property>
- <UpdateItem>
- <Property name="dataSet">dsMain</Property>
- <Property name="dataPath">[#current]</Property>
- </UpdateItem>
- </UpdateAction>
- <AjaxAction id="ajaxDelData">
- <Property name="confirmMessage">纭畾瑕佸垹闄ゆ暟鎹箞锛�</Property>
- <Property name="service">snapConfPR#delete</Property>
- </AjaxAction>
- </View>
-</ViewConfig>
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java
deleted file mode 100644
index d534350..0000000
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapConfPR.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.fzzy.igds;
-
-import com.bstek.dorado.annotation.DataProvider;
-import com.bstek.dorado.annotation.DataResolver;
-import com.bstek.dorado.annotation.Expose;
-import com.fzzy.igds.data.BaseResp;
-import com.fzzy.igds.data.IgdsBaseParam;
-import com.fzzy.igds.domain.SnapConf;
-import com.fzzy.igds.service.SnapConfService;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-@Component
-public class SnapConfPR {
-
- @Resource
- private SnapConfService snapConfService;
-
-
- /**
- * snapConfPR#listAll
- * 璐ㄦ娂鍒楄〃
- */
- @DataProvider
- public List<SnapConf> listAll(IgdsBaseParam param) {
- return snapConfService.listAll(param);
- }
-
- /**
- * 淇濆瓨/鏇存柊
- *
- * @param snapConf
- * @return
- */
- @Transactional
- @DataResolver
- public BaseResp saveUpdate(SnapConf snapConf) {
- if (null == snapConf.getCreateTime()) {
- return snapConfService.addData(snapConf);
- } else {
- return snapConfService.updateData(snapConf);
- }
- }
-
-
- /**
- * 鍒犻櫎
- *
- * @param snapConf
- * @return
- */
- @Expose
- public BaseResp delete(SnapConf snapConf) {
- if (StringUtils.isNotEmpty(snapConf.getId())) return snapConfService.deleteData(snapConf);
- return BaseResp.success();
- }
-}
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SnapConfController.java b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SnapConfController.java
new file mode 100644
index 0000000..50d48f8
--- /dev/null
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SnapConfController.java
@@ -0,0 +1,136 @@
+package com.fzzy.sys.controller.security;
+
+import com.fzzy.igds.domain.SnapConf;
+import com.fzzy.igds.utils.ContextUtil;
+import com.fzzy.sys.manager.security.SnapConfManager;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+@Controller
+@RequestMapping("/security/snap/snapConf")
+public class SnapConfController extends BaseController {
+
+ private static final String prefix = "security/snap/snapConf";
+
+ @Resource
+ private SnapConfManager snapConfManager;
+
+ /**
+ * 鎶撴媿閰嶇疆椤甸潰
+ */
+ @GetMapping()
+ public String snapConf() {
+ return prefix + "/snapConf";
+ }
+
+ /**
+ * 鏌ヨ鎶撴媿閰嶇疆鍒楄〃
+ */
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(SnapConf param) {
+ if (null == param.getCompanyId()) {
+ param.setCompanyId(ShiroUtils.getLoginUserCompanyId());
+ }
+ startPage();
+ List<SnapConf> list = snapConfManager.selectList(param);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭鎶撴媿閰嶇疆鍒楄〃
+ */
+ @Log(title = "鎶撴媿閰嶇疆绠$悊", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(SnapConf param) {
+ if (null == param.getCompanyId()) {
+ param.setCompanyId(ShiroUtils.getLoginUserCompanyId());
+ }
+ List<SnapConf> list = snapConfManager.selectList(param);
+ ExcelUtil<SnapConf> util = new ExcelUtil<>(SnapConf.class);
+ return util.exportExcel(list, "鎶撴媿閰嶇疆鏁版嵁");
+ }
+
+ /**
+ * 鏂板鎶撴媿閰嶇疆椤甸潰
+ */
+ @GetMapping("/add")
+ public String add(ModelMap mmap) {
+ return prefix + "/add";
+ }
+
+ /**
+ * 鏂板鎶撴媿閰嶇疆鏁版嵁
+ */
+ @Log(title = "鎶撴媿閰嶇疆绠$悊", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(@Validated SnapConf param) {
+ if (null == param.getCompanyId()) {
+ param.setCompanyId(ShiroUtils.getLoginUserCompanyId());
+ }
+ param.setCreateBy(getLoginName());
+ param.setCreateTime(new Date());
+ if (StringUtils.isEmpty(param.getId())) {
+ param.setId(ContextUtil.generateId());
+ }
+ return toAjax(snapConfManager.insertData(param));
+ }
+
+ /**
+ * 淇敼鎶撴媿閰嶇疆椤甸潰
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") String id, ModelMap mmap) {
+ SnapConf record = snapConfManager.selectById(id);
+ mmap.put("snapConf", record);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 淇敼鎶撴媿閰嶇疆鏁版嵁
+ */
+ @Log(title = "鎶撴媿閰嶇疆绠$悊", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(@Validated SnapConf param) {
+ if (null == param.getCompanyId()) {
+ param.setCompanyId(ShiroUtils.getLoginUserCompanyId());
+ }
+ param.setUpdateBy(getLoginName());
+ param.setUpdateTime(new Date());
+ SnapConf snapConf = snapConfManager.selectById(param.getId());
+ if (snapConf == null) {
+ param.setId(ContextUtil.generateId());
+ return toAjax(snapConfManager.insertData(param));
+ }
+
+ return toAjax(snapConfManager.updateData(param));
+ }
+
+ /**
+ * 鍒犻櫎鎶撴媿閰嶇疆鏁版嵁
+ */
+ @Log(title = "鎶撴媿閰嶇疆绠$悊", businessType = BusinessType.DELETE)
+ @PostMapping("/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids) {
+ snapConfManager.deleteDataById(ids);
+ return success();
+ }
+}
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/security/SnapConfManager.java b/fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/security/SnapConfManager.java
new file mode 100644
index 0000000..3266ba4
--- /dev/null
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/security/SnapConfManager.java
@@ -0,0 +1,66 @@
+package com.fzzy.sys.manager.security;
+
+import com.fzzy.igds.domain.SnapConf;
+import com.fzzy.igds.service.SnapConfService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Slf4j
+@Component
+public class SnapConfManager {
+
+ @Resource
+ private SnapConfService snapConfService;
+
+ /**
+ * 鏌ヨ鏁版嵁
+ *
+ * @param param 鏌ヨ鍙傛暟
+ * @return 鏁版嵁鍒楄〃
+ */
+ public List<SnapConf> selectList(SnapConf param) {
+ return snapConfService.selectList(param);
+ }
+
+ /**
+ * 鏍规嵁ID鏌ヨ鏁版嵁
+ *
+ * @param id 涓婚敭ID
+ * @return SnapConf瀹炰綋瀵硅薄
+ */
+ public SnapConf selectById(String id) {
+ return snapConfService.selectById(id);
+ }
+
+ /**
+ * 鎻掑叆鏁版嵁
+ *
+ * @param param 鏁版嵁瀹炰綋
+ * @return 褰卞搷琛屾暟
+ */
+ public int insertData(SnapConf param) {
+ return snapConfService.insertData(param);
+ }
+
+ /**
+ * 鏇存柊鏁版嵁
+ *
+ * @param param 鏁版嵁瀹炰綋
+ * @return 褰卞搷琛屾暟
+ */
+ public int updateData(SnapConf param) {
+ return snapConfService.updateData(param);
+ }
+
+ /**
+ * 鍒犻櫎鏁版嵁
+ *
+ * @param ids 瑕佸垹闄ょ殑璁板綍ID闆嗗悎锛堥�楀彿鍒嗛殧锛�
+ */
+ public void deleteDataById(String ids) {
+ snapConfService.deleteDataById(ids);
+ }
+}
diff --git a/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js b/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
index 3152a96..9e3ebb2 100644
--- a/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
+++ b/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
@@ -288,6 +288,6 @@
});
}
function openConf() {
- var url = ctx + "com.fzzy.igds.SnapConf.d";
+ var url = ctx + "security/snap/snapConf";
$.modal.openTab("鎶撴媿閰嶇疆", url);
}
diff --git a/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolConf/patrolConf.html b/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolConf/patrolConf.html
index eaae53d..5fdea66 100644
--- a/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolConf/patrolConf.html
+++ b/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolConf/patrolConf.html
@@ -24,16 +24,16 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="web:security:patrol:patrolConf:add">
+ <a class="btn btn-success" onclick="$.operate.add()" >
<i class="fa fa-plus"></i> 鏂板
</a>
- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="web:security:patrol:patrolConf:edit">
+ <a class="btn btn-primary single disabled" onclick="$.operate.edit()" >
<i class="fa fa-edit"></i> 淇敼
</a>
- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="web:security:patrol:patrolConf:remove">
+ <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" >
<i class="fa fa-remove"></i> 鍒犻櫎
</a>
- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="web:security:patrol:patrolConf:export">
+ <a class="btn btn-warning" onclick="$.table.exportExcel()" >
<i class="fa fa-download"></i> 瀵煎嚭
</a>
</div>
@@ -45,8 +45,6 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
- var editFlag = [[${@permission.hasPermi('web:security:patrol:patrolConf:edit')}]];
- var removeFlag = [[${@permission.hasPermi('web:security:patrol:patrolConf:remove')}]];
var prefix = ctx + "security/patrol/patrolConf";
$(function() {
@@ -88,8 +86,8 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
- actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.batchId + '\')"><i class="fa fa-edit"></i>缂栬緫</a> ');
- actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.batchId + '\')"><i class="fa fa-remove"></i>鍒犻櫎</a>');
+ actions.push('<a class="btn btn-success btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.batchId + '\')"><i class="fa fa-edit"></i>缂栬緫</a> ');
+ actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.batchId + '\')"><i class="fa fa-remove"></i>鍒犻櫎</a>');
return actions.join('');
}
}]
diff --git a/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/add.html b/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/add.html
new file mode 100644
index 0000000..44fa0f8
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/add.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+ <th:block th:include="include :: header('鏂板鎶撴媿閰嶇疆')"/>
+ <th:block th:include="include :: select2-css"/>
+</head>
+<body>
+<div class="main-content">
+ <form id="form-snap-add" class="form-horizontal">
+ <input name="deptId" type="hidden" id="treeId"/>
+
+ <div class="row">
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵�灞炲簱鍖猴細</label>
+ <div class="col-sm-8">
+ <input name="deptId" id="deptId" placeholder="璇疯緭鍏ユ墍灞炲簱鍖�" class="form-control" type="text"
+ maxlength="40">
+ </div>
+ </div>
+ </div>
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎶撴媿鐩戞帶锛�</label>
+ <div class="col-sm-8">
+ <input name="cameraId" id="cameraId" placeholder="璇疯緭鍏ユ姄鎷嶇洃鎺D" class="form-control" type="text"
+ maxlength="40">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵ц鏃堕棿1锛堝皬鏃讹級锛�</label>
+ <div class="col-sm-8">
+ <input name="actHour1" id="actHour1" placeholder="璇疯緭鍏ユ墽琛屾椂闂�1" class="form-control" type="number"
+ min="0" max="23">
+ </div>
+ </div>
+ </div>
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵ц鏃堕棿2锛堝皬鏃讹級锛�</label>
+ <div class="col-sm-8">
+ <input name="actHour2" id="actHour2" placeholder="璇疯緭鍏ユ墽琛屾椂闂�2" class="form-control" type="number"
+ min="0" max="23">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵ц鏃堕棿3锛堝皬鏃讹級锛�</label>
+ <div class="col-sm-8">
+ <input name="actHour3" id="actHour3" placeholder="璇疯緭鍏ユ墽琛屾椂闂�3" class="form-control" type="number"
+ min="0" max="23">
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: select2-js"/>
+<script>
+ var prefix = ctx + "security/snap/snapConf";
+
+ $("#form-snap-add").validate({
+ onkeyup: false,
+ rules: {},
+ messages: {},
+ focusCleanup: true
+ });
+
+ // 纭畾鎸夐挳 鎻愪氦鏁版嵁
+ function submitHandler() {
+ if ($.validate.form()) {
+ $.operate.save(prefix + "/add", $('#form-snap-add').serialize());
+ }
+ }
+</script>
+</body>
+</html>
diff --git a/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/edit.html b/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/edit.html
new file mode 100644
index 0000000..52f8c76
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/edit.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+ <th:block th:include="include :: header('淇敼鎶撴媿閰嶇疆')"/>
+ <th:block th:include="include :: select2-css"/>
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+ <form class="form-horizontal m" id="form-snap-edit" th:object="${snapConf}">
+ <input id="id" name="id" th:field="*{id}" type="hidden">
+ <div class="row">
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵�灞炲簱鍖猴細</label>
+ <div class="col-sm-8">
+ <input name="deptId" id="deptId" th:field="*{deptId}" placeholder="璇疯緭鍏ユ墍灞炲簱鍖�" class="form-control"
+ type="text" maxlength="40">
+ </div>
+ </div>
+ </div>
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎶撴媿鐩戞帶锛�</label>
+ <div class="col-sm-8">
+ <input name="cameraId" id="cameraId" th:field="*{cameraId}" placeholder="璇疯緭鍏ユ姄鎷嶇洃鎺D" class="form-control"
+ type="text" maxlength="40">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵ц鏃堕棿1锛堝皬鏃讹級锛�</label>
+ <div class="col-sm-8">
+ <input name="actHour1" id="actHour1" th:field="*{actHour1}" placeholder="璇疯緭鍏ユ墽琛屾椂闂�1" class="form-control"
+ type="number" min="0" max="23">
+ </div>
+ </div>
+ </div>
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵ц鏃堕棿2锛堝皬鏃讹級锛�</label>
+ <div class="col-sm-8">
+ <input name="actHour2" id="actHour2" th:field="*{actHour2}" placeholder="璇疯緭鍏ユ墽琛屾椂闂�2" class="form-control"
+ type="number" min="0" max="23">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-6">
+ <div class="form-group">
+ <label class="col-sm-4 control-label">鎵ц鏃堕棿3锛堝皬鏃讹級锛�</label>
+ <div class="col-sm-8">
+ <input name="actHour3" id="actHour3" th:field="*{actHour3}" placeholder="璇疯緭鍏ユ墽琛屾椂闂�3" class="form-control"
+ type="number" min="0" max="23">
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: select2-js"/>
+<script type="text/javascript">
+ var prefix = ctx + "security/snap/snapConf";
+
+ $("#form-snap-edit").validate({
+ onkeyup: false,
+ rules: {},
+ messages: {},
+ focusCleanup: true
+ });
+
+ function submitHandler() {
+ if ($.validate.form()) {
+ $.operate.save(prefix + "/edit", $('#form-snap-edit').serialize());
+ }
+ }
+</script>
+</body>
+</html>
diff --git a/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/snapConf.html b/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/snapConf.html
new file mode 100644
index 0000000..277ed90
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/security/snap/snapConf/snapConf.html
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+ <th:block th:include="include :: header('蹇媿閰嶇疆鍒楄〃')" />
+ <th:block th:include="include :: select2-css" />
+</head>
+<body class="gray-bg">
+<div class="container-div">
+ <div class="row">
+ <div class="col-sm-12 search-collapse">
+ <form id="property-form">
+ <div class="select-list">
+ <ul>
+ <li>
+ 鍚嶇О锛�<input type="text" name="name"/>
+ </li>
+ <li>
+ <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 鎼滅储</a>
+ <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 閲嶇疆</a>
+ </li>
+ </ul>
+ </div>
+ </form>
+ </div>
+
+ <div class="btn-group-sm" id="toolbar" role="group">
+ <a class="btn btn-success" onclick="$.operate.add()" >
+ <i class="fa fa-plus"></i> 鏂板
+ </a>
+ <a class="btn btn-primary single disabled" onclick="$.operate.edit()" >
+ <i class="fa fa-edit"></i> 淇敼
+ </a>
+ <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" >
+ <i class="fa fa-remove"></i> 鍒犻櫎
+ </a>
+ <a class="btn btn-warning" onclick="$.table.exportExcel()" >
+ <i class="fa fa-download"></i> 瀵煎嚭
+ </a>
+ </div>
+ <div class="col-sm-12 select-table table-striped">
+ <table id="bootstrap-table"></table>
+ </div>
+ </div>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: select2-js" />
+<script th:inline="javascript">
+ var prefix = ctx + "security/snap/snapConf";
+
+ $(function() {
+ var options = {
+ url: prefix + "/list",
+ createUrl: prefix + "/add",
+ updateUrl: prefix + "/edit/{id}",
+ removeUrl: prefix + "/remove",
+ exportUrl: prefix + "/export",
+ sortName: "id",
+ sortOrder: "asc",
+ modalName: "鎶撴媿閰嶇疆",
+ columns: [{
+ checkbox: true
+ },
+ {
+ field: 'id',
+ title: '涓婚敭',
+ visible: false,
+ },
+ {
+ field: 'deptId',
+ title: '鎵�灞炲簱鍖�',
+ align: 'left',
+ },
+ {
+ field: 'cameraId',
+ title: '鎶撴媿鐩戞帶',
+ },
+ {
+ title: '鎿嶄綔',
+ align: 'center',
+ formatter: function(value, row, index) {
+ var actions = [];
+ actions.push('<a class="btn btn-success btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>缂栬緫</a> ');
+ actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>鍒犻櫎</a>');
+ return actions.join('');
+ }
+ }]
+ };
+ $.table.init(options);
+ });
+</script>
+</body>
+</html>
--
Gitblit v1.9.3