Browse Source

配置选择

master
周俊杰 1 year ago
parent
commit
c228986686
  1. 3
      acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java
  2. 9
      acs/nladmin-system/src/main/java/org/nl/acs/device/wql/Qdevice_query_002.wql
  3. 47
      acs/nladmin-ui/src/views/acs/device/index.vue

3
acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java

@ -89,6 +89,9 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
if (whereJson.get("device_type") != null) { if (whereJson.get("device_type") != null) {
param.put("device_type", whereJson.get("device_type")); param.put("device_type", whereJson.get("device_type"));
} }
if (whereJson.get("is_config") != null) {
param.put("is_config", whereJson.get("is_config"));
}
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc"); JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc");
return json; return json;

9
acs/nladmin-system/src/main/java/org/nl/acs/device/wql/Qdevice_query_002.wql

@ -24,6 +24,7 @@
输入.methods_id TYPEAS s_string 输入.methods_id TYPEAS s_string
输入.blurry TYPEAS s_string 输入.blurry TYPEAS s_string
输入.region TYPEAS s_string 输入.region TYPEAS s_string
输入.is_config TYPEAS s_string
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
@ -49,13 +50,16 @@
PAGEQUERY PAGEQUERY
SELECT SELECT
d.*, dict.label AS device_type_name, d.*, dict.label AS device_type_name,
dict2.label AS region_name dict2.label AS region_name,
dict3.label AS config
FROM FROM
ACS_DEVICE d ACS_DEVICE d
LEFT JOIN sys_dict_detail dict ON dict.value = d.device_type LEFT JOIN sys_dict_detail dict ON dict.value = d.device_type
AND dict.`name` = 'device_type' AND dict.`name` = 'device_type'
LEFT JOIN sys_dict_detail dict2 ON dict2.value = d.region LEFT JOIN sys_dict_detail dict2 ON dict2.value = d.region
AND dict2.`name` = 'region_type' AND dict2.`name` = 'region_type'
LEFT JOIN sys_dict_detail dict3 ON dict3.value = d.is_config
AND dict3.`name` = 'is_config'
WHERE WHERE
is_delete = '0' is_delete = '0'
OPTION 输入.blurry <> "" OPTION 输入.blurry <> ""
@ -67,6 +71,9 @@
OPTION 输入.device_type <> "" OPTION 输入.device_type <> ""
d.device_type = 输入.device_type d.device_type = 输入.device_type
ENDOPTION ENDOPTION
OPTION 输入.is_config <> ""
d.is_config = 输入.is_config
ENDOPTION
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY
ENDIF ENDIF

47
acs/nladmin-ui/src/views/acs/device/index.vue

@ -38,17 +38,29 @@
> >
<el-option v-for="item in regions" :key="item.id" :label="item.label" :value="item.value" /> <el-option v-for="item in regions" :key="item.id" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-select
v-model="query.is_config"
clearable
filterable
size="small"
placeholder="是否配置"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in is_configs" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<rrOperation /> <rrOperation />
</div> </div>
<crudOperation :permission="permission"> <crudOperation :permission="permission">
<el-button <el-button
slot="right" slot="right"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
icon="el-icon-download" icon="el-icon-download"
@click="crud.doExport" @click="crud.doExport"
>导出模型</el-button> >导出模型</el-button>
<el-button <el-button
slot="right" slot="right"
class="filter-item" class="filter-item"
@ -108,6 +120,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否配置" prop="is_config">
<el-select v-model="form.is_config" style="width: 370px" placeholder="请选择">
<el-option
v-for="item in is_configs"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="顺序号" prop="seq_num"> <el-form-item label="顺序号" prop="seq_num">
<el-input-number v-model="form.seq_num" value="1" :min="1" label="描述文字" /> <el-input-number v-model="form.seq_num" value="1" :min="1" label="描述文字" />
</el-form-item> </el-form-item>
@ -194,8 +216,8 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import { get } from '@/api/system/dictDetail' import { get } from '@/api/system/dictDetail'
import UploadDialog from '@/views/acs/device/UploadDialog' import UploadDialog from '@/views/acs/device/UploadDialog'
import {download} from '@/api/data' import { download } from '@/api/data'
import {downloadFile} from '@/utils' import { downloadFile } from '@/utils'
const defaultForm = { const defaultForm = {
manufacturer: null, manufacturer: null,
@ -239,8 +261,9 @@ export default {
}, },
device_types: [], device_types: [],
regions: [], regions: [],
is_configs: [],
uploadShow: false, uploadShow: false,
regions: [], regions: [],
rules: { rules: {
device_code: [ device_code: [
@ -268,6 +291,10 @@ export default {
get('region').then(data => { get('region').then(data => {
this.regions = data.content this.regions = data.content
}) })
//
get('is_config').then(data => {
this.is_configs = data.content
})
}) })
}, },
methods: { methods: {

Loading…
Cancel
Save