no message
This commit is contained in:
parent
a63ec4f751
commit
0809996b0e
31
fuintAdmin/src/api/seeting/canshu.js
Normal file
31
fuintAdmin/src/api/seeting/canshu.js
Normal file
@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
//
|
||||
export function getListByPageApi(query) {
|
||||
return request({
|
||||
url: 'oilParameterConfig',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function addOilParameterConfigApi(data) {
|
||||
return request({
|
||||
url: 'oilParameterConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function editOilParameterConfigApi(data) {
|
||||
return request({
|
||||
url: 'oilParameterConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function delOilParameterConfigApi(query) {
|
||||
return request({
|
||||
url: 'oilParameterConfig',
|
||||
method: 'delete',
|
||||
params: query
|
||||
})
|
||||
}
|
31
fuintAdmin/src/api/seeting/youqiji.js
Normal file
31
fuintAdmin/src/api/seeting/youqiji.js
Normal file
@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
// 打印设备增删改查接口
|
||||
export function getListByPageApi(query) {
|
||||
return request({
|
||||
url: 'oilEngineConfig',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function addOilEngineConfigApi(data) {
|
||||
return request({
|
||||
url: 'oilEngineConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function editOilEngineConfigApi(data) {
|
||||
return request({
|
||||
url: 'oilEngineConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function delOilEngineConfigApi(query) {
|
||||
return request({
|
||||
url: `oilEngineConfig/`+query,
|
||||
method: 'delete',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -86,12 +86,7 @@ export const constantRoutes = [
|
||||
name: 'Index',
|
||||
meta: { title: '系统首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: 'resource_oilstore',
|
||||
component: () => import('@/views/index2.vue'),
|
||||
name: 'resourceOilstore',
|
||||
meta: { title: '系统首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
|
||||
// {
|
||||
// path: 'resource_oilstore',
|
||||
// component: () => import('@/views/index'),
|
||||
@ -100,7 +95,12 @@ export const constantRoutes = [
|
||||
// }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: 'resource_oilstore',
|
||||
component: () => import('@/views/index2.vue'),
|
||||
name: 'resourceOilstore',
|
||||
meta: { title: '系统首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: '/account',
|
||||
component: Layout,
|
||||
|
@ -5,18 +5,18 @@
|
||||
<el-form-item label="" prop="legalRepresentativeContact">
|
||||
|
||||
<el-select
|
||||
v-model="queryParams.orgId"
|
||||
v-model="queryParams.deviceType"
|
||||
clearable
|
||||
placeholder="请选择设备类型"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName" :value="item.deptId">
|
||||
<el-option v-for="item in deviceTypeList" :key="item" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="legalRepresentativeContact">
|
||||
<el-form-item label="" prop="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.legalRepresentativeContact"
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@ -37,10 +37,9 @@
|
||||
<div style="height: 70vh;overflow: auto">
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||
<el-table-column align="center" prop="orgName" label="设备类型"></el-table-column>
|
||||
<el-table-column align="center" prop="unifiedSocialCreditCode" label="设备名称"></el-table-column>
|
||||
<el-table-column align="center" prop="appId" label="设备id"></el-table-column>
|
||||
<el-table-column align="center" prop="appKey" label="密钥"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceType" label="设备类型"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceId" label="设备id"></el-table-column>
|
||||
<el-table-column align="center" prop="createByName" label="创建人"></el-table-column>
|
||||
<el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
@ -50,16 +49,16 @@
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="edit(scope.row)"
|
||||
v-hasPermi="['setting:app:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="del(scope.row)"
|
||||
v-hasPermi="['setting:app:delete']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
<!-- v-hasPermi="['setting:app:delete']"-->
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
@ -75,9 +74,9 @@
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body>
|
||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="140px" :rules="rule">
|
||||
<el-form-item label="设备类型" prop="orgId">
|
||||
<el-form-item label="设备类型" prop="deviceType">
|
||||
<el-select
|
||||
v-model="deviceInfo.orgId"
|
||||
v-model="deviceInfo.deviceType"
|
||||
clearable
|
||||
placeholder="设备类型"
|
||||
style="width: 300px;"
|
||||
@ -87,11 +86,16 @@
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="unifiedSocialCreditCode">
|
||||
<el-input v-model="deviceInfo.unifiedSocialCreditCode" style="width: 300px;"></el-input>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="deviceInfo.deviceName" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备id" prop="appId">
|
||||
<el-input v-model="deviceInfo.appId" style="width: 300px;"></el-input>
|
||||
|
||||
<el-form-item v-if="deviceInfo.deviceType !== 'BY'" label="设备id" prop="deviceId">
|
||||
<el-input v-model="deviceInfo.deviceId" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="deviceId1">
|
||||
<div style="color: red; line-height: 15px">注:DD、LY的设备ID,需要找业务人员获取,DD是集线器ID、LY是门店ID。
|
||||
BY的设备ID,创建后将自动生成,请把设备ID提供给BY技术人员进行配置。 </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -107,6 +111,13 @@
|
||||
<script>
|
||||
|
||||
|
||||
import {
|
||||
addOilEngineConfigApi,
|
||||
delOilEngineConfigApi,
|
||||
editOilEngineConfigApi,
|
||||
getListByPageApi
|
||||
} from "@/api/seeting/youqiji";
|
||||
|
||||
export default {
|
||||
name: "youqiji",
|
||||
|
||||
@ -120,17 +131,11 @@ export default {
|
||||
],
|
||||
|
||||
deviceInfo: {
|
||||
id: null, // 自增id
|
||||
orgName: '', // 机构名称
|
||||
orgId: '', // 机构名称
|
||||
unifiedSocialCreditCode: '', // 统一社会信用代码
|
||||
appId: '', // 小程序appID
|
||||
appKey: '', // 密钥
|
||||
legalRepresentativeName: '', // 法人姓名
|
||||
legalRepresentativeWechat: '', // 法人微信
|
||||
legalRepresentativeContact: '', // 法人联系方式
|
||||
appStatus: false, // 小程序状态
|
||||
createByName: '',
|
||||
id: null, // 自增id
|
||||
deviceType: 'BY',
|
||||
deviceName: '',
|
||||
deviceId: '',
|
||||
|
||||
},
|
||||
rule: {
|
||||
orgId: [{required: true, message: '请选择机构名称', trigger: 'blur'},],
|
||||
@ -161,18 +166,13 @@ export default {
|
||||
this.getDeptList()
|
||||
},
|
||||
methods: {
|
||||
getDeptList() {
|
||||
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
// this.deptList = response.data.records;
|
||||
// })
|
||||
},
|
||||
|
||||
getList(){
|
||||
// getAppListApi(this.queryParams).then(res=>{
|
||||
// this.tableData = res.data.records;
|
||||
// this.total = res.data.total
|
||||
// })
|
||||
getListByPageApi(this.queryParams).then(res=>{
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
getsSubmitDeviceInfo(){},
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
@ -189,40 +189,23 @@ export default {
|
||||
submitDeviceInfo() {
|
||||
// 在这里调用接口提交设备信息数据
|
||||
|
||||
let filter = this.deptList.filter(item => item.deptId == this.deviceInfo.orgId);
|
||||
|
||||
this.deviceInfo.orgName = filter[0].deptName
|
||||
|
||||
if (this.deviceInfo.id) {
|
||||
// updateAppApi(this.deviceInfo).then(res=>{
|
||||
// if(res.code === 200) {
|
||||
// this.getList()
|
||||
// this.open = false
|
||||
// }
|
||||
//
|
||||
// })
|
||||
editOilEngineConfigApi(this.deviceInfo).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
|
||||
})
|
||||
}else {
|
||||
// saveAppApi(this.deviceInfo).then(res=>{
|
||||
// if(res.code === 200) {
|
||||
// this.getList()
|
||||
// this.open = false
|
||||
// }
|
||||
// })
|
||||
addOilEngineConfigApi(this.deviceInfo).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
changeStatus(data){
|
||||
console.log(123123123)
|
||||
// updateAppApi(data).then(res=>{
|
||||
// if(res.code === 200) {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '修改状态成功!'
|
||||
// });
|
||||
// this.getList()
|
||||
// }
|
||||
//
|
||||
// })
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList()
|
||||
},
|
||||
@ -237,32 +220,32 @@ export default {
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "新增小程序配置"
|
||||
this.title = "新增设置"
|
||||
},
|
||||
edit(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "编辑小程序配置"
|
||||
this.title = "编辑设置"
|
||||
this.deviceInfo = e
|
||||
console.log('提交设备信息数据:', this.deviceInfo);
|
||||
|
||||
},
|
||||
del(e) {
|
||||
|
||||
this.$confirm('此操作将永久删除该设备, 是否继续?', '提示', {
|
||||
this.$confirm('是否删除本条数据, 删除后无法恢复?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// deleteAppApi(e.id).then(res=>{
|
||||
// if (res.code == 200) {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '删除成功!'
|
||||
// });
|
||||
// this.getList()
|
||||
// }
|
||||
// })
|
||||
delOilEngineConfigApi(e.id).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
@ -277,15 +260,10 @@ export default {
|
||||
clean() {
|
||||
this.deviceInfo= {
|
||||
id: null, // 自增id
|
||||
orgName: '', // 机构名称
|
||||
unifiedSocialCreditCode: '', // 统一社会信用代码
|
||||
appId: '', // 小程序appID
|
||||
appKey: '', // 密钥
|
||||
legalRepresentativeName: '', // 法人姓名
|
||||
legalRepresentativeWeChat: '', // 法人微信
|
||||
legalRepresentativeContact: '', // 法人联系方式
|
||||
appStatus: false, // 小程序状态
|
||||
createByName: '',
|
||||
deviceType: 'BY',
|
||||
deviceName: '',
|
||||
deviceId: '',
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -15,30 +15,31 @@
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleAdd">新增设备</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 列表信息-->
|
||||
<el-card style="margin-top: 20px" >
|
||||
<!-- <!– 列表信息–>-->
|
||||
<!-- <el-card style="margin-top: 20px" >-->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增设备</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- >新增设备</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
</el-row>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="machineCode" label="设备终端号"></el-table-column>
|
||||
<el-table-column prop="msign" label="设备密钥"></el-table-column>
|
||||
<el-table-column prop="deviceName" label="设备名称"></el-table-column>
|
||||
<el-table-column prop="userId" label="用户id"></el-table-column>
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||
<el-table-column align="center" prop="machineCode" label="设备终端号"></el-table-column>
|
||||
<el-table-column align="center" prop="msign" label="设备密钥"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
|
||||
<el-table-column align="center" prop="userId" label="用户id"></el-table-column>
|
||||
<!-- <el-table-column prop="appKey" label="应用id(APP_KEY)"></el-table-column>-->
|
||||
<!-- <el-table-column prop="appSecret" label="应用密钥(APP_SECRET)"></el-table-column>-->
|
||||
<!-- <el-table-column prop="appPublicKey" label="应用公钥(key)"></el-table-column>-->
|
||||
|
@ -57,5 +57,7 @@ public class OilEngineConfig extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
private Integer storeId;
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import com.fuint.business.deviceManage.mapper.OilEngineConfigMapper;
|
||||
import com.fuint.business.deviceManage.service.OilEngineConfigService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@ -41,6 +43,11 @@ public class OilEngineConfigServiceImpl extends ServiceImpl<OilEngineConfigMappe
|
||||
*/
|
||||
@Override
|
||||
public int insert(OilEngineConfig oilEngineConfig) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
oilEngineConfig.setStoreId(nowAccountInfo.getStoreId());
|
||||
if ("BY".equals(oilEngineConfig.getDeviceType())) {
|
||||
|
||||
}
|
||||
return baseMapper.insert(oilEngineConfig);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user