no message

This commit is contained in:
DESKTOP-369JRHT\12997 2024-08-05 14:59:47 +08:00
parent a63ec4f751
commit 0809996b0e
7 changed files with 161 additions and 111 deletions

View 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
})
}

View 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
})
}

View File

@ -86,12 +86,7 @@ export const constantRoutes = [
name: 'Index', name: 'Index',
meta: { title: '系统首页', icon: 'dashboard', affix: true } 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', // path: 'resource_oilstore',
// component: () => import('@/views/index'), // 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', path: '/account',
component: Layout, component: Layout,

View File

@ -5,18 +5,18 @@
<el-form-item label="" prop="legalRepresentativeContact"> <el-form-item label="" prop="legalRepresentativeContact">
<el-select <el-select
v-model="queryParams.orgId" v-model="queryParams.deviceType"
clearable clearable
placeholder="请选择设备类型" 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-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="legalRepresentativeContact"> <el-form-item label="" prop="deviceName">
<el-input <el-input
v-model="queryParams.legalRepresentativeContact" v-model="queryParams.deviceName"
placeholder="请输入设备名称" placeholder="请输入设备名称"
clearable clearable
style="width: 240px;" style="width: 240px;"
@ -37,10 +37,9 @@
<div style="height: 70vh;overflow: auto"> <div style="height: 70vh;overflow: auto">
<el-table :data="tableData" style="width: 100%" border> <el-table :data="tableData" style="width: 100%" border>
<el-table-column align="center" type="index" label="序号"></el-table-column> <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="deviceType" label="设备类型"></el-table-column>
<el-table-column align="center" prop="unifiedSocialCreditCode" label="设备名称"></el-table-column> <el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
<el-table-column align="center" prop="appId" label="设备id"></el-table-column> <el-table-column align="center" prop="deviceId" label="设备id"></el-table-column>
<el-table-column align="center" prop="appKey" label="密钥"></el-table-column>
<el-table-column align="center" prop="createByName" label="创建人"></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 align="center" prop="createTime" label="创建时间"></el-table-column>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
@ -50,16 +49,16 @@
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="edit(scope.row)" @click="edit(scope.row)"
v-hasPermi="['setting:app:edit']"
>编辑</el-button> >编辑</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="del(scope.row)" @click="del(scope.row)"
v-hasPermi="['setting:app:delete']"
>删除</el-button> >删除</el-button>
</template> </template>
<!-- v-hasPermi="['setting:app:delete']"-->
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -75,9 +74,9 @@
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body> <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 :model="deviceInfo" ref="deviceForm" label-width="140px" :rules="rule">
<el-form-item label="设备类型" prop="orgId"> <el-form-item label="设备类型" prop="deviceType">
<el-select <el-select
v-model="deviceInfo.orgId" v-model="deviceInfo.deviceType"
clearable clearable
placeholder="设备类型" placeholder="设备类型"
style="width: 300px;" style="width: 300px;"
@ -87,11 +86,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="设备名称" prop="unifiedSocialCreditCode"> <el-form-item label="设备名称" prop="deviceName">
<el-input v-model="deviceInfo.unifiedSocialCreditCode" style="width: 300px;"></el-input> <el-input v-model="deviceInfo.deviceName" style="width: 300px;"></el-input>
</el-form-item> </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">DDLY的设备ID需要找业务人员获取DD是集线器IDLY是门店ID
BY的设备ID创建后将自动生成请把设备ID提供给BY技术人员进行配置 </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -107,6 +111,13 @@
<script> <script>
import {
addOilEngineConfigApi,
delOilEngineConfigApi,
editOilEngineConfigApi,
getListByPageApi
} from "@/api/seeting/youqiji";
export default { export default {
name: "youqiji", name: "youqiji",
@ -121,16 +132,10 @@ export default {
deviceInfo: { deviceInfo: {
id: null, // id id: null, // id
orgName: '', // deviceType: 'BY',
orgId: '', // deviceName: '',
unifiedSocialCreditCode: '', // deviceId: '',
appId: '', // appID
appKey: '', //
legalRepresentativeName: '', //
legalRepresentativeWechat: '', //
legalRepresentativeContact: '', //
appStatus: false, //
createByName: '',
}, },
rule: { rule: {
orgId: [{required: true, message: '请选择机构名称', trigger: 'blur'},], orgId: [{required: true, message: '请选择机构名称', trigger: 'blur'},],
@ -161,18 +166,13 @@ export default {
this.getDeptList() this.getDeptList()
}, },
methods: { methods: {
getDeptList() {
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
// this.deptList = response.data.records;
// })
},
getList(){ getList(){
// getAppListApi(this.queryParams).then(res=>{ getListByPageApi(this.queryParams).then(res=>{
// this.tableData = res.data.records; this.tableData = res.data.records;
// this.total = res.data.total this.total = res.data.total
// }) })
}, },
getsSubmitDeviceInfo(){},
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
@ -189,39 +189,22 @@ export default {
submitDeviceInfo() { submitDeviceInfo() {
// //
let filter = this.deptList.filter(item => item.deptId == this.deviceInfo.orgId);
this.deviceInfo.orgName = filter[0].deptName
if (this.deviceInfo.id) { if (this.deviceInfo.id) {
// updateAppApi(this.deviceInfo).then(res=>{ editOilEngineConfigApi(this.deviceInfo).then(res=>{
// if(res.code === 200) { if(res.code === 200) {
// this.getList() this.getList()
// this.open = false this.open = false
// } }
//
// }) })
}else { }else {
// saveAppApi(this.deviceInfo).then(res=>{ addOilEngineConfigApi(this.deviceInfo).then(res=>{
// if(res.code === 200) { if(res.code === 200) {
// this.getList() this.getList()
// this.open = false this.open = false
// } }
// }) })
} }
},
changeStatus(data){
console.log(123123123)
// updateAppApi(data).then(res=>{
// if(res.code === 200) {
// this.$message({
// type: 'success',
// message: '!'
// });
// this.getList()
// }
//
// })
}, },
handleQuery(){ handleQuery(){
this.getList() this.getList()
@ -237,32 +220,32 @@ export default {
handleAdd(e) { handleAdd(e) {
this.clean() this.clean()
this.open = true; this.open = true;
this.title = "新增小程序配置" this.title = "新增置"
}, },
edit(e) { edit(e) {
this.clean() this.clean()
this.open = true; this.open = true;
this.title = "编辑小程序配置" this.title = "编辑置"
this.deviceInfo = e this.deviceInfo = e
console.log('提交设备信息数据:', this.deviceInfo); console.log('提交设备信息数据:', this.deviceInfo);
}, },
del(e) { del(e) {
this.$confirm('此操作将永久删除该设备, 是否继续?', '提示', { this.$confirm('是否删除本条数据, 删除后无法恢复?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// deleteAppApi(e.id).then(res=>{ delOilEngineConfigApi(e.id).then(res=>{
// if (res.code == 200) { if (res.code == 200) {
// this.$message({ this.$message({
// type: 'success', type: 'success',
// message: '!' message: '删除成功!'
// }); });
// this.getList() this.getList()
// } }
// }) })
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
@ -277,15 +260,10 @@ export default {
clean() { clean() {
this.deviceInfo= { this.deviceInfo= {
id: null, // id id: null, // id
orgName: '', // deviceType: 'BY',
unifiedSocialCreditCode: '', // deviceName: '',
appId: '', // appID deviceId: '',
appKey: '', //
legalRepresentativeName: '', //
legalRepresentativeWeChat: '', //
legalRepresentativeContact: '', //
appStatus: false, //
createByName: '',
} }
}, },
} }

View File

@ -15,30 +15,31 @@
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</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-item>
</el-form> </el-form>
</el-card> <!-- </el-card>-->
<!-- 列表信息--> <!-- &lt;!&ndash; 列表信息&ndash;&gt;-->
<el-card style="margin-top: 20px" > <!-- <el-card style="margin-top: 20px" >-->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
icon="el-icon-plus" <!-- icon="el-icon-plus"-->
@click="handleAdd" <!-- @click="handleAdd"-->
>新增设备</el-button> <!-- >新增设备</el-button>-->
</el-col> <!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row> </el-row>
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%" border>
<el-table-column type="index" label="序号"></el-table-column> <el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column prop="machineCode" label="设备终端号"></el-table-column> <el-table-column align="center" prop="machineCode" label="设备终端号"></el-table-column>
<el-table-column prop="msign" label="设备密钥"></el-table-column> <el-table-column align="center" prop="msign" label="设备密钥"></el-table-column>
<el-table-column prop="deviceName" label="设备名称"></el-table-column> <el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
<el-table-column prop="userId" label="用户id"></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="appKey" label="应用id(APP_KEY)"></el-table-column>-->
<!-- <el-table-column prop="appSecret" label="应用密钥(APP_SECRET)"></el-table-column>--> <!-- <el-table-column prop="appSecret" label="应用密钥(APP_SECRET)"></el-table-column>-->
<!-- <el-table-column prop="appPublicKey" label="应用公钥(key)"></el-table-column>--> <!-- <el-table-column prop="appPublicKey" label="应用公钥(key)"></el-table-column>-->

View File

@ -57,5 +57,7 @@ public class OilEngineConfig extends BaseEntity implements Serializable {
*/ */
private String updateBy; private String updateBy;
private Integer storeId;
} }

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.deviceManage.entity.OilEngineConfig; import com.fuint.business.deviceManage.entity.OilEngineConfig;
import com.fuint.business.deviceManage.mapper.OilEngineConfigMapper; import com.fuint.business.deviceManage.mapper.OilEngineConfigMapper;
import com.fuint.business.deviceManage.service.OilEngineConfigService; import com.fuint.business.deviceManage.service.OilEngineConfigService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -41,6 +43,11 @@ public class OilEngineConfigServiceImpl extends ServiceImpl<OilEngineConfigMappe
*/ */
@Override @Override
public int insert(OilEngineConfig oilEngineConfig) { public int insert(OilEngineConfig oilEngineConfig) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilEngineConfig.setStoreId(nowAccountInfo.getStoreId());
if ("BY".equals(oilEngineConfig.getDeviceType())) {
}
return baseMapper.insert(oilEngineConfig); return baseMapper.insert(oilEngineConfig);
} }