jiazx0107@163.com
2023-11-06 69cd9f59a0fabf12f8c9147fcba7f69817a870b3
igds-security/src/main/java/com/ld/igds/sec/view/SecSnapDepot.view.xml
@@ -20,6 +20,11 @@
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">所属仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="cameraId">
        <Property></Property>
@@ -29,19 +34,19 @@
        <Property name="dataType">Date</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
      <PropertyDef name="zpsj">
        <Property name="dataType">Date</Property>
        <Property name="label">抓拍时间</Property>
      <PropertyDef name="result">
        <Property></Property>
        <Property name="label">抓拍结果</Property>
      </PropertyDef>
      <PropertyDef name="txwjhzm">
      <PropertyDef name="fileSuffix">
        <Property></Property>
        <Property name="label">图像文件后缀名</Property>
      </PropertyDef>
      <PropertyDef name="wjmc">
      <PropertyDef name="fileName">
        <Property></Property>
        <Property name="label">文件名称</Property>
      </PropertyDef>
      <PropertyDef name="yzwbh">
      <PropertyDef name="preset">
        <Property></Property>
        <Property name="label">预置位编号</Property>
      </PropertyDef>
@@ -60,22 +65,47 @@
        <Property></Property>
        <Property name="label">所属分库</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">所属仓库</Property>
      </PropertyDef>
      <PropertyDef name="cameraId">
        <Property></Property>
        <Property name="label">关联摄像头</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">所属仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="cameraId">
        <Property></Property>
        <Property name="label">关联摄像头</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;securityPR#listCamera&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="actHour1">
        <Property name="dataType">int</Property>
        <Property name="label">第一次</Property>
        <Property name="displayFormat"># 点</Property>
      </PropertyDef>
      <PropertyDef name="actHour2">
        <Property name="dataType">int</Property>
        <Property name="label">第二次</Property>
        <Property name="displayFormat"># 点</Property>
      </PropertyDef>
      <PropertyDef name="actHour3">
        <Property name="dataType">int</Property>
        <Property name="label">第三次</Property>
        <Property name="displayFormat"># 点</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQuery">
      <PropertyDef name="depotId">
        <Property/>
        <Property></Property>
        <Property name="label">所属仓库</Property>
      </PropertyDef>
      <PropertyDef name="start">
@@ -85,6 +115,18 @@
      <PropertyDef name="end">
        <Property name="label">截止日期</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="actHour1">
        <Property name="dataType">int</Property>
        <Property name="label">第一次</Property>
      </PropertyDef>
      <PropertyDef name="actHour2">
        <Property name="dataType">int</Property>
        <Property name="label">第二次</Property>
      </PropertyDef>
      <PropertyDef name="actHour3">
        <Property name="dataType">int</Property>
        <Property name="label">第三次</Property>
      </PropertyDef>
    </DataType>
  </Model>
@@ -98,10 +140,15 @@
    </DataSet>
    <DataSet id="dsConf">
      <Property name="dataType">[dtConf]</Property>
      <Property name="dataProvider">secSnapDepotPR#listConf</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <ClientEvent name="onReady">self.insert({});</ClientEvent>
      <Property name="dataType">dtQuery</Property>
    </DataSet>
    <DataSet id="dsParam">
      <Property name="dataType">dtConf</Property>
      <Property name="dataProvider">secSnapDepotPR#getConfActHour</Property>
    </DataSet>
    <Panel layout="regionPadding:10">
      <Property name="caption">视频图像信息管理</Property>
@@ -160,14 +207,15 @@
        <Container layoutConstraint="center">
          <Property name="exClassName">bg-color</Property>
          <DataBlockView>
            <ClientEvent name="onRenderBlock">&#xD;
var time = arg.data.get(&quot;zpsj&quot;).formatDate(&quot;Y-m-d H:i&quot;);&#xD;
var hwdm = arg.data.getText(&quot;hwdm&quot;);&#xD;
var cfdm = arg.data.getText(&quot;cfdm&quot;);&#xD;
var kqdm = arg.data.getText(&quot;kqdm&quot;);&#xD;
var imgSrc = &quot;../../grain/file/get-depot-snap?filePath=&quot;+arg.data.get(&quot;wjdz&quot;);&#xD;
var htm = &quot;&lt;div>&lt;img src='&quot;+imgSrc+&quot;' style='height:250px; width:100%;'>&lt;div>&lt;span style='padding-left:10px;'>库区:&quot;+kqdm+&quot;&lt;/span>&lt;span style='float:right;padding-right:10px;'>仓房:&quot;+cfdm+&quot;&lt;/span>&lt;/div>&lt;div>&lt;span style='padding-left:10px;'>货位:&quot;+hwdm+&quot;&lt;/span>&lt;span style='float:right;padding-right:10px;'>时间:&quot;+time+&quot;&lt;/span>&lt;/div>&lt;/div>&quot;;&#xD;
&#xD;
            <ClientEvent name="onRenderBlock">var id = arg.data.get(&quot;id&quot;);&#xD;
var time = arg.data.get(&quot;updateTime&quot;).formatDate(&quot;Y-m-d H:i&quot;);&#xD;
var timeStr = arg.data.get(&quot;updateTime&quot;).formatDate(&quot;Ymd&quot;);&#xD;
var depotId = arg.data.getText(&quot;depotId&quot;);&#xD;
var imgSrc = &quot;../../basic/file/get-snap-depot?fileName=&quot;+arg.data.get(&quot;fileName&quot;)+&quot;&amp;timeStr=&quot;+timeStr;&#xD;
var htm = &quot;&lt;div>&lt;img src='./static/images/img-fail.jpg' style='height:250px; width:100%;'>&lt;div>&lt;span style='padding-left:10px;'>仓库:未查询到数据&lt;/span>&lt;span style='float:right;padding-right:10px;'>时间:&quot;+time+&quot;&lt;/span>&lt;/div>&lt;/div>&quot;;&#xD;
if(&quot;TEST&quot; != id){&#xD;
   htm = &quot;&lt;div>&lt;img src='&quot;+imgSrc+&quot;' style='height:250px; width:100%;'>&lt;div>&lt;span style='padding-left:10px;'>仓库:&quot;+depotId+&quot;&lt;/span>&lt;span style='float:right;padding-right:10px;'>时间:&quot;+time+&quot;&lt;/span>&lt;/div>&lt;/div>&quot;;&#xD;
}&#xD;
arg.dom.innerHTML = htm;&#xD;
arg.progressDefault=false;</ClientEvent>
            <Property name="dataSet">dsMain</Property>
@@ -192,25 +240,72 @@
      <Tools/>
    </Panel>
    <Dialog id="dialogConf">
      <Property name="width">750</Property>
      <Property name="caption">仓内抓拍配置</Property>
      <Buttons/>
      <Children>
        <ToolBar>
          <ToolBarButton>
            <Property name="caption">新增</Property>
          </ToolBarButton>
        </ToolBar>
        <DataGrid>
          <Property name="dataSet">dsConf</Property>
          <DataColumn name="depotId">
            <Property name="property">depotId</Property>
          </DataColumn>
          <DataColumn name="cameraId">
            <Property name="property">cameraId</Property>
          </DataColumn>
          <DataColumn name="updateTime">
            <Property name="property">updateTime</Property>
          </DataColumn>
        </DataGrid>
        <FieldSet>
          <Property name="caption">抓拍摄像头配置</Property>
          <Buttons>
            <Button>
              <ClientEvent name="onClick">view.get(&quot;#dsConf&quot;).insert();</ClientEvent>
              <Property name="caption">新增配置</Property>
            </Button>
            <Button>
              <Property name="caption">保存配置</Property>
              <Property name="action">updateConf</Property>
            </Button>
          </Buttons>
          <Children>
            <DataGrid layoutConstraint="padding:10px">
              <Property name="dataSet">dsConf</Property>
              <Property name="height">400</Property>
              <RowNumColumn/>
              <DataColumn name="depotId">
                <Property name="property">depotId</Property>
              </DataColumn>
              <DataColumn name="cameraId">
                <Property name="property">cameraId</Property>
              </DataColumn>
            </DataGrid>
          </Children>
        </FieldSet>
        <FieldSet>
          <Property name="caption">抓拍时间配置</Property>
          <Property name="height">150</Property>
          <Buttons>
            <Button>
              <ClientEvent name="onClick">var data = view.get(&quot;#dsParam.data&quot;);&#xD;
view.get(&quot;#ajaxSnapTime&quot;).set(&quot;parameter&quot;,data).execute();</ClientEvent>
              <Property name="caption">保存抓时间</Property>
            </Button>
          </Buttons>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsParam</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <AutoFormElement>
                <Property name="name">actHour1</Property>
                <Property name="property">actHour1</Property>
                <Property name="trigger">listHour</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">actHour2</Property>
                <Property name="property">actHour2</Property>
                <Property name="trigger">listHour</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">actHour3</Property>
                <Property name="property">actHour3</Property>
                <Property name="trigger">listHour</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
@@ -218,5 +313,17 @@
      <Property name="service">videoImgPR#delData</Property>
      <Property name="confirmMessage">当前数据删除后无法恢复,请确认要删除么?</Property>
    </AjaxAction>
    <UpdateAction id="updateConf">
      <Property name="dataResolver">secSnapDepotPR#updateConf</Property>
      <UpdateItem>
        <Property name="dataSet">dsConf</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxSnapTime">
      <Property name="service">secSnapDepotPR#updateActHour</Property>
    </AjaxAction>
    <ListDropDown id="listHour">
      <Property name="items">0,7,8,9,10,11,12,13,14,15,16,17,18</Property>
    </ListDropDown>
  </View>
</ViewConfig>