余额明细角色
This commit is contained in:
parent
f46507c00b
commit
331309681e
|
@ -3,7 +3,7 @@ import fsExtra from 'fs-extra'
|
|||
const { existsSync, remove, copy } = fsExtra
|
||||
const cwd = process.cwd()
|
||||
//打包发布路径,谨慎改动
|
||||
const releaseRelativePath = '../server/public/admin'
|
||||
const releaseRelativePath = '../public/admin'
|
||||
const distPath = path.resolve(cwd, 'dist')
|
||||
const releasePath = path.resolve(cwd, releaseRelativePath)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
|||
|
||||
// 角色表列表
|
||||
export function apiUserRoleLists(params: any) {
|
||||
return request.get({ url: '/user.user_role/lists', params })
|
||||
return request.get({ url: '/user.user/roleLists', params })
|
||||
}
|
||||
|
||||
// 添加角色表
|
||||
|
|
|
@ -3,7 +3,7 @@ const config = {
|
|||
title: "后台管理系统", //网站默认标题
|
||||
version: "1.6.0", //版本号
|
||||
baseUrl: `${
|
||||
import.meta.env.VITE_APP_BASE_URL || "https://ceshi-middle.lihaink.cn/"
|
||||
import.meta.env.VITE_APP_BASE_URL || "https://ceshi-middle.lihaink.cn"
|
||||
}/`, //请求接口域名
|
||||
urlPrefix: "adminapi", //请求默认前缀
|
||||
timeout: 10 * 1000, //请求超时时长
|
||||
|
|
|
@ -10,14 +10,7 @@
|
|||
placeholder="请输入名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.sort"
|
||||
clearable
|
||||
placeholder="请输入排序"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
class="w-[280px]"
|
||||
|
|
|
@ -43,6 +43,15 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="13">
|
||||
<el-form-item label="绑定应用" prop="phone" v-for="(item,i) in formData.app_list" :key="i">
|
||||
<el-input v-model="item.name" placeholder="绑定应用" :disabled="flag" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-form-item label="省" prop="province" style="flex: 1">
|
||||
<el-select v-model="formData.province" placeholder="请选择省" :disabled="flag" clearable @change="province_change" :style="{ width: '100%' }">
|
||||
|
@ -369,7 +378,7 @@ const getDetails = async () => {
|
|||
formData.gender = data.gender;
|
||||
formData.phone = data.phone;
|
||||
formData.gender = data.gender;
|
||||
|
||||
formData.app_list= data.app_list;
|
||||
formData.contract_type = data.contract?.contract_type;
|
||||
formData.party_b_name = data.contract?.party_b_name;
|
||||
formData.party_b = data.contract?.party_b;
|
||||
|
@ -380,9 +389,11 @@ const getDetails = async () => {
|
|||
name: data.contract ?? "合同文件",
|
||||
})
|
||||
: "";
|
||||
await getCityList();
|
||||
await getAreaList();
|
||||
await getStreetList();
|
||||
|
||||
// await getCityList();
|
||||
// await getAreaList();
|
||||
// await getStreetList();
|
||||
|
||||
};
|
||||
|
||||
const handleEdit = async (value: string, field: string) => {
|
||||
|
|
|
@ -41,6 +41,14 @@
|
|||
<el-table-column label="账号" prop="phone" min-width="120" />
|
||||
<el-table-column label="姓名" prop="nickname" min-width="100" />
|
||||
<el-table-column label="联系方式" prop="phone" min-width="120" />
|
||||
<!-- <el-table-column label="绑定应用" min-width="120">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.app_list.length>0">
|
||||
<div v-for="(item,i) in row" :key="i"> {{ item.name }}</div>
|
||||
</div>
|
||||
<div v-else>暂无数据</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="隶属公司" prop="company_name" min-width="180" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.company?.company_name || '/' }}
|
||||
|
|
|
@ -101,12 +101,12 @@ const initUserList = async () => {
|
|||
company_id: queryParams.company_id,
|
||||
});
|
||||
|
||||
// let role = await apiUserRoleLists({});
|
||||
// res = res.map((item: any) => {
|
||||
// let p = role.lists.find((e: any) => e.id == item.group_id);
|
||||
// p.name ? (item.group_name = p.name) : (item.group_name = "暂无角色");
|
||||
// return item;
|
||||
// });
|
||||
let role = await apiUserRoleLists({});
|
||||
res = res.map((item: any) => {
|
||||
let p = role.lists.find((e: any) => e.id == item.group_id);
|
||||
p.name ? (item.group_name = p.name) : (item.group_name = "暂无角色");
|
||||
return item;
|
||||
});
|
||||
userList.value = res;
|
||||
};
|
||||
initUserList();
|
||||
|
|
|
@ -1,488 +0,0 @@
|
|||
<template>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-table :data="formData">
|
||||
<el-table-column label="名称" prop="name" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" show-overflow-tooltip align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" @click="editSystemFn(row)" link>
|
||||
检测信息编辑
|
||||
</el-button>
|
||||
<el-button type="primary" @click="editSystemFn2(row)" link>
|
||||
溯源信息编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!-- 详情与编辑 -->
|
||||
<el-dialog v-model="dialogTableVisible" width="30%" align-center>
|
||||
<el-form label-width="100px" :model="formData1" style="max-width: 460px" v-if="id == 1">
|
||||
<el-form-item label="土壤温度">
|
||||
<el-input v-model="formData1.soil_temperature" />
|
||||
</el-form-item>
|
||||
<el-form-item label="土壤湿度">
|
||||
<el-input v-model="formData1.soil_moisture" />
|
||||
</el-form-item>
|
||||
<el-form-item label="风向">
|
||||
<el-input v-model="formData1.wind_direction" />
|
||||
</el-form-item>
|
||||
<el-form-item label="风速">
|
||||
<el-input v-model="formData1.wind_speed" />
|
||||
</el-form-item>
|
||||
<el-form-item label="降雨量">
|
||||
<el-input v-model="formData1.rainfall" />
|
||||
</el-form-item>
|
||||
<el-form-item label="光照">
|
||||
<el-input v-model="formData1.illumination" />
|
||||
</el-form-item>
|
||||
<el-form-item label="二氧化碳">
|
||||
<el-input v-model="formData1.carbon_dioxide_content" />
|
||||
</el-form-item>
|
||||
<el-row style="float: right;">
|
||||
<el-button type="primary" @click="confirm(formData1)">确定</el-button>
|
||||
<!-- <el-button @click="cancel">取消</el-button> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-form label-width="100px" :model="formData2" style="max-width: 460px" v-if="id == 2">
|
||||
<el-form-item label="土壤温度">
|
||||
<el-input v-model="formData2.soil_temperature" />
|
||||
</el-form-item>
|
||||
<el-form-item label="土壤湿度">
|
||||
<el-input v-model="formData2.soil_moisture" />
|
||||
</el-form-item>
|
||||
<el-form-item label="风向">
|
||||
<el-input v-model="formData2.wind_direction" />
|
||||
</el-form-item>
|
||||
<el-form-item label="风速">
|
||||
<el-input v-model="formData2.wind_speed" />
|
||||
</el-form-item>
|
||||
<el-form-item label="降雨量">
|
||||
<el-input v-model="formData2.rainfall" />
|
||||
</el-form-item>
|
||||
<el-form-item label="光照">
|
||||
<el-input v-model="formData2.illumination" />
|
||||
</el-form-item>
|
||||
<el-form-item label="二氧化碳">
|
||||
<el-input v-model="formData2.carbon_dioxide_content" />
|
||||
</el-form-item>
|
||||
<el-row style="float: right;">
|
||||
<el-button type="primary" @click="confirm(formData2)">确定</el-button>
|
||||
<!-- <el-button @click="cancel">取消</el-button> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- -->
|
||||
<el-form label-width="100px" :model="formData3" style="max-width: 460px" v-if="id == 3">
|
||||
<el-form-item label="室内温度">
|
||||
<el-input v-model="formData3.room_temperature" />
|
||||
</el-form-item>
|
||||
<el-form-item label="空气湿度">
|
||||
<el-input v-model="formData3.air_humidity" />
|
||||
</el-form-item>
|
||||
<el-form-item label="氨气含量">
|
||||
<el-input v-model="formData3.ammonia_nitrogen_content" />
|
||||
</el-form-item>
|
||||
<el-form-item label="甲烷含量">
|
||||
<el-input v-model="formData3.methane_content" />
|
||||
</el-form-item>
|
||||
<el-form-item label="空气质量指数">
|
||||
<el-input v-model="formData3.air_quality_index" />
|
||||
</el-form-item>
|
||||
<el-form-item label="降雨量">
|
||||
<el-input v-model="formData3.rainfall" />
|
||||
</el-form-item>
|
||||
<el-form-item label="风向">
|
||||
<el-input v-model="formData3.wind_direction" />
|
||||
</el-form-item>
|
||||
<el-form-item label="风速">
|
||||
<el-input v-model="formData3.wind_direction" />
|
||||
</el-form-item>
|
||||
<el-form-item label="光照">
|
||||
<el-input v-model="formData3.illumination" />
|
||||
</el-form-item>
|
||||
|
||||
<el-row style="float: right;">
|
||||
<el-button type="primary" @click="confirm(formData3)">确定</el-button>
|
||||
<!-- <el-button @click="cancel">取消</el-button> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- -->
|
||||
<el-form label-width="100px" :model="formData4" style="max-width: 460px" v-if="id == 4">
|
||||
<el-form-item label="池塘温度">
|
||||
<el-input v-model="formData4.pond_temperature" />
|
||||
</el-form-item>
|
||||
<el-form-item label="池塘PH">
|
||||
<el-input v-model="formData4.pond_ph_value" />
|
||||
</el-form-item>
|
||||
<el-form-item label="溶氧量">
|
||||
<el-input v-model="formData4.dissolved_oxygen" />
|
||||
</el-form-item>
|
||||
<el-form-item label="氨氮量">
|
||||
<el-input v-model="formData4.ammonia_nitrogen_content" />
|
||||
</el-form-item>
|
||||
<el-form-item label="亚硝酸盐">
|
||||
<el-input v-model="formData4.nitrite_content" />
|
||||
</el-form-item>
|
||||
<el-row style="float: right;">
|
||||
<el-button type="primary" @click="confirm(formData4)">确定</el-button>
|
||||
<!-- <el-button @click="cancel">取消</el-button> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="dialogTableVisible2" width="30%" align-center>
|
||||
<div v-if="id == 1">
|
||||
<div>柑橘溯源信息</div>
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="suyuan1.spmc" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产地址">
|
||||
<el-input v-model="suyuan1.scdz" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="生长期">
|
||||
<el-input v-model="suyuan1.szq" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="肥料名称">
|
||||
<el-input v-model="suyuan1.flmc" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="肥料用量">
|
||||
<el-input v-model="suyuan1.flyl" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="施肥人">
|
||||
<el-input v-model="suyuan1.sfr" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="农药名称">
|
||||
<el-input v-model="suyuan1.nymc" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="农药用量">
|
||||
<el-input v-model="suyuan1.nyyl" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="打药人">
|
||||
<el-input v-model="suyuan1.dyr" />
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采摘人">
|
||||
<el-input v-model="suyuan1.czr" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="果园图片">
|
||||
<el-input v-model="suyuan1.gytp" />
|
||||
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="id == 2">
|
||||
<div>蔬菜溯源信息</div>
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="suyuan1.spmc" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产地址">
|
||||
<el-input v-model="suyuan1.scdz" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="生长期">
|
||||
<el-input v-model="suyuan1.scq" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="肥料名称">
|
||||
<el-input v-model="suyuan1.flmc" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="肥料用量">
|
||||
<el-input v-model="suyuan1.flyl" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="施肥人">
|
||||
<el-input v-model="suyuan1.sfr" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="农药名称">
|
||||
<el-input v-model="suyuan1.nymc" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="农药用量">
|
||||
<el-input v-model="suyuan1.nyyl" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="打药人">
|
||||
<el-input v-model="suyuan1.dyr" />
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采摘人">
|
||||
<el-input v-model="suyuan1.czr" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="蔬菜图片">
|
||||
<el-input v-model="suyuan1.gytp" />
|
||||
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="id == 3">
|
||||
<div>鸡畜溯源信息</div>
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="suyuan3.spmc" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产地址">
|
||||
<el-input v-model="suyuan3.scdz" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="生产期">
|
||||
<el-input v-model="suyuan3.scq" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="饲料名称">
|
||||
<el-input v-model="suyuan3.slmc" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="饲料用量">
|
||||
<el-input v-model="suyuan3.slyl" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="饲养人">
|
||||
<el-input v-model="suyuan3.syr" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="鸡畜图片">
|
||||
<el-input v-model="suyuan3.jctp" />
|
||||
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="id == 4">
|
||||
<div>鱼虾溯源信息</div>
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="suyuan4.spmc" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产地址">
|
||||
<el-input v-model="suyuan4.scdz" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="生产期">
|
||||
<el-input v-model="suyuan4.scq" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="饲料名称">
|
||||
<el-input v-model="suyuan4.slmc" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="饲料用量">
|
||||
<el-input v-model="suyuan4.slyl" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="饲养人">
|
||||
<el-input v-model="suyuan4.syr" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="鱼虾图片">
|
||||
<el-input v-model="suyuan4.yxtp" />
|
||||
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-button type="primary" @click="confirm1">确定</el-button>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="dialogTableVisible2" width="30%" align-center>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// import { systemListApi, editAPI, systemDeleteApi, systemAddApi, systemEditApi } from "@/api/system";
|
||||
import { editssAPI } from "@/api/testa.ts";
|
||||
|
||||
// import { apiCompanyLists } from "@/api/company";
|
||||
import { reactive, ref } from "vue"
|
||||
|
||||
// 刷新页面
|
||||
const refreshView = () => {
|
||||
appStore.refreshView()
|
||||
}
|
||||
// 查询条件
|
||||
|
||||
// 列表hooks
|
||||
const formData = reactive(
|
||||
[
|
||||
{
|
||||
id: 1,
|
||||
name: "柑橘",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "蔬菜",
|
||||
}, {
|
||||
id: 3,
|
||||
name: "鸡畜",
|
||||
}, {
|
||||
id: 4,
|
||||
name: "🐟",
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
)
|
||||
const formData1 = reactive(
|
||||
{
|
||||
production_base_id: 1,
|
||||
flag: 1,
|
||||
soil_temperature: 20,
|
||||
soil_moisture: 50,
|
||||
wind_direction: "北",
|
||||
wind_speed: "3.4",
|
||||
rainfall: "20",
|
||||
illumination: "2w",
|
||||
carbon_dioxide_content: "450",
|
||||
hour: "",
|
||||
day: "",
|
||||
month: ""
|
||||
}
|
||||
)
|
||||
|
||||
const formData2 = reactive(
|
||||
{
|
||||
production_base_id: 2,
|
||||
flag: 1,
|
||||
soil_temperature: 20,
|
||||
soil_moisture: 50,
|
||||
wind_direction: "北",
|
||||
wind_speed: "3.4",
|
||||
rainfall: "20",
|
||||
illumination: "2w",
|
||||
carbon_dioxide_content: "450",
|
||||
}
|
||||
)
|
||||
const formData3 = reactive(
|
||||
{
|
||||
production_base_id: 3,
|
||||
flag: 1,
|
||||
|
||||
room_temperature: 20,
|
||||
air_humidity: 50,
|
||||
ammonia_nitrogen_content: "北",
|
||||
methane_content: "3.4",
|
||||
air_quality_index: "20",
|
||||
rainfall: "2w",
|
||||
wind_direction: "450",
|
||||
wind_speed: 40,
|
||||
illumination: 40,
|
||||
|
||||
}
|
||||
)
|
||||
const formData4 = reactive(
|
||||
{
|
||||
production_base_id: 4,
|
||||
flag: 1,
|
||||
|
||||
pond_temperature: 20,
|
||||
pond_ph_value: 50,
|
||||
dissolved_oxygen: "北",
|
||||
ammonia_nitrogen_content: "3.4",
|
||||
nitrite_content: "20",
|
||||
}
|
||||
)
|
||||
const suyuan1 = reactive({
|
||||
spmc: '',
|
||||
scdz: "",
|
||||
scq: "",
|
||||
flmc: "",
|
||||
flyl: "",
|
||||
sfr: "",
|
||||
nymc: "",
|
||||
nyyl: "",
|
||||
dyr: "",
|
||||
dyr_img: "",
|
||||
czr: "",
|
||||
gytp: ""
|
||||
})
|
||||
const suyuan2 = reactive({
|
||||
spmc: '',
|
||||
scdz: "",
|
||||
scq: "",
|
||||
flmc: "",
|
||||
flyl: "",
|
||||
sfr: "",
|
||||
nymc: "",
|
||||
nyyl: "",
|
||||
dyr: "",
|
||||
dyr_img: "",
|
||||
czr: "",
|
||||
sctp: ""
|
||||
})
|
||||
const suyuan3 = reactive({
|
||||
spmc: "",
|
||||
scdz: "",
|
||||
scq: "",
|
||||
slmc: "",
|
||||
slyl: "",
|
||||
syr: "",
|
||||
jctp: "",
|
||||
})
|
||||
const suyuan4 = reactive({
|
||||
spmc: "",
|
||||
scdz: "",
|
||||
scq: "",
|
||||
slmc: "",
|
||||
slyl: "",
|
||||
syr: "",
|
||||
yxtp: "",
|
||||
|
||||
})
|
||||
const dialogTableVisible = ref(false)
|
||||
const dialogTableVisible2 = ref(false)
|
||||
const dialogTableVisible3 = ref(false)
|
||||
const id = ref(1)
|
||||
// pop
|
||||
|
||||
|
||||
|
||||
|
||||
const editSystemFn = (row) => {
|
||||
id.value = row.id
|
||||
dialogTableVisible.value = true
|
||||
|
||||
return
|
||||
systemDetailApi({ id: row.id }).then(res => {
|
||||
console.log(res)
|
||||
for (var prop in formData) {
|
||||
// @ts-ignore
|
||||
formData[prop] = res[prop];
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
// refreshView()
|
||||
}
|
||||
const editSystemFn2 = (row) => {
|
||||
id.value = row.id
|
||||
dialogTableVisible2.value = true
|
||||
|
||||
return
|
||||
systemDetailApi({ id: row.id }).then(res => {
|
||||
console.log(res)
|
||||
for (var prop in formData) {
|
||||
// @ts-ignore
|
||||
formData[prop] = res[prop];
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
// refreshView()
|
||||
}
|
||||
// d
|
||||
const confirm = (formDatas: any) => {
|
||||
console.log(formDatas)
|
||||
editssAPI({ ...formDatas })
|
||||
dialogTableVisible.value = false
|
||||
|
||||
}
|
||||
const confirm1 = () => {
|
||||
dialogTableVisible2.value = false
|
||||
console.log(suyuan1.content)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -1,80 +1,3 @@
|
|||
<template>
|
||||
asdsa
|
||||
edit
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { systemEditApi, systemDetailApi } from "@/api/system";
|
||||
import { reactive } from "vue"
|
||||
const route = useRoute();
|
||||
const setFormData = (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const formData = reactive({
|
||||
id: null,
|
||||
phone: null,
|
||||
avatar: null,
|
||||
nick_name: null,
|
||||
real_name: null,
|
||||
id_card: null,
|
||||
gender: null,
|
||||
age: null,
|
||||
total_balance: null,
|
||||
total_integral: null,
|
||||
address: null,
|
||||
status: null,
|
||||
last_login_time: null,
|
||||
last_login_ip: null,
|
||||
create_time: null,
|
||||
gender_text: null,
|
||||
status_text: null,
|
||||
balance_list: [
|
||||
{
|
||||
id: null,
|
||||
record_id: null,
|
||||
amount: null,
|
||||
total_amount: null,
|
||||
type: null,
|
||||
pay_type: null,
|
||||
mark: null,
|
||||
create_time: null,
|
||||
app: null,
|
||||
type_text: null,
|
||||
pay_type_text: null,
|
||||
},
|
||||
],
|
||||
integral_list: [
|
||||
{
|
||||
id: null,
|
||||
record_id: 1,
|
||||
amount: "44.00",
|
||||
total_amount: "66.00",
|
||||
type: 1,
|
||||
mark: "签到奖励",
|
||||
appid: "AD1695113831",
|
||||
create_time: "2023-09-19 17:52:44",
|
||||
app: "里海超市",
|
||||
type_text: "收入",
|
||||
},
|
||||
],
|
||||
});
|
||||
const queryParams = reactive({
|
||||
name: "",
|
||||
status: "1",
|
||||
});
|
||||
|
||||
systemDetailApi({ id: route.query.id }).then((res) => {
|
||||
setFormData(res);
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.bottomTables {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,248 +1,304 @@
|
|||
<template>
|
||||
<!-- <el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="姓名" prop="nick_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.nick_name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input class="w-[280px]" v-model="queryParams.phone" clearable placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-button type="primary" @click="addSystemFn">
|
||||
新增
|
||||
</el-button>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="应用id" prop="id" align="center" />
|
||||
<el-table-column label="应用名称" prop="name" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="应用appid" prop="app_id" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="应用appkey" prop="app_key" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="应用排序" prop="sort" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="应用状态" prop="status_text" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" show-overflow-tooltip align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" @click="detailPop(row)" link>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button type="primary" @click="deleteSystemFn(row)" link>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" @click="editSystemFn(row)" link>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-form-item label="所属片区" prop="address">
|
||||
<el-input class="w-[280px]" v-model="queryParams.address" clearable placeholder="请选择" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" clearable placeholder="请选择状态">
|
||||
<el-option label="正常" :value="0"></el-option>
|
||||
<el-option label="禁用" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card> -->
|
||||
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-button type="primary" @click="addSystemFn">
|
||||
新增
|
||||
</el-button>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label=" 应用id" prop="id" align="center" />
|
||||
<el-table-column label="应用名称" prop="name" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="应用appid" prop="app_id" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="应用appkey" prop="app_key" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="应用状态" prop="status_text" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" show-overflow-tooltip align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" @click="detailPop(row)" link>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button type="primary" @click="deleteSystemFn(row)" link>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" @click="editSystemFn(row)" link>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 详情与编辑 -->
|
||||
<el-dialog v-model="dialogTableVisible" width="30%" align-center :title="poptit" @close="cancel">
|
||||
<el-form label-width="100px" :model="formData" :disabled="formDisab" style="max-width: 460px">
|
||||
<el-form-item label="应用ID" v-if="mode == 'r' || mode == 'u'">
|
||||
<el-input :disabled="true" v-model="formData.id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用名称">
|
||||
<el-input v-model="formData.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用url" v-if="mode == 'r' || mode == 'c' || mode == 'u'">
|
||||
<el-input v-model="formData.url" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用appid" v-if="mode == 'r'">
|
||||
<el-input v-model="formData.app_id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用appkey" v-if="mode == 'r'">
|
||||
<el-input v-model="formData.app_key" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用状态" v-if="mode == 'r' || mode == 'u'">
|
||||
<el-select v-model="formData.status" clearable class="w-[400px]">
|
||||
<el-option label="正常" :value="0"></el-option>
|
||||
<el-option label="异常" :value="1"></el-option>
|
||||
<el-option label="删除" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" v-if="mode == 'r'">
|
||||
<el-input v-model="formData.create_time" />
|
||||
</el-form-item>
|
||||
<el-row style="float: right;">
|
||||
<el-button type="primary" @click="confirm">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 详情与编辑 -->
|
||||
<el-dialog v-model="dialogTableVisible" width="30%" align-center :title="poptit" @close="cancel">
|
||||
<el-form label-width="100px" :model="formData" :disabled="formDisab" style="max-width: 460px">
|
||||
<el-form-item label="应用ID">
|
||||
<el-input :disabled="true" v-model="formData.id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用名称">
|
||||
<el-input v-model="formData.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用appid">
|
||||
<el-input v-model="formData.app_id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用appkey">
|
||||
<el-input v-model="formData.app_key" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用域名">
|
||||
<el-input v-model="formData.url" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用状态">
|
||||
<el-select v-model="formData.status" clearable class="w-[400px]">
|
||||
<el-option label="正常" :value="0"></el-option>
|
||||
<el-option label="异常" :value="1"></el-option>
|
||||
<el-option label="删除" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册状态">
|
||||
<el-select v-model="formData.register_status" clearable class="w-[400px]">
|
||||
<el-option label="未开启注册" :value="0"></el-option>
|
||||
<el-option label="开启注册" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" v-if="mode == 'r'">
|
||||
<el-input v-model="formData.create_time" />
|
||||
</el-form-item>
|
||||
<el-form-item label="icon图标">
|
||||
<el-input v-model="formData.icon" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下载地址">
|
||||
<el-input v-model="formData.down_url" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号">
|
||||
<el-input v-model="formData.app_version" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序">
|
||||
<el-input v-model="formData.sort" />
|
||||
</el-form-item>
|
||||
<el-row style="float: right;">
|
||||
<el-button type="primary" @click="confirm">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { systemListApi, systemDetailApi, systemDeleteApi, systemAddApi, systemEditApi } from "@/api/system";
|
||||
import {
|
||||
systemListApi,
|
||||
systemDetailApi,
|
||||
systemDeleteApi,
|
||||
systemAddApi,
|
||||
systemEditApi,
|
||||
} from "@/api/system";
|
||||
// import { apiCompanyLists } from "@/api/company";
|
||||
import { reactive, ref } from "vue"
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { markRaw } from 'vue'
|
||||
import { Delete } from '@element-plus/icons-vue'
|
||||
import useAppStore from '@/stores/modules/app'
|
||||
const appStore = useAppStore()
|
||||
import { reactive, ref } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { markRaw } from "vue";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import useAppStore from "@/stores/modules/app";
|
||||
import { inject } from "vue";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const base_url: any = inject("base_url");
|
||||
// 刷新页面
|
||||
const refreshView = () => {
|
||||
appStore.refreshView()
|
||||
}
|
||||
appStore.refreshView();
|
||||
};
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
nick_name: "",
|
||||
phone: '',
|
||||
status: "",
|
||||
address: "",
|
||||
nick_name: "",
|
||||
phone: "",
|
||||
status: "",
|
||||
address: "",
|
||||
});
|
||||
const formDisab = ref(false)
|
||||
const formDisab = ref(false);
|
||||
// 列表hooks
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: systemListApi,
|
||||
params: queryParams,
|
||||
fetchFun: systemListApi,
|
||||
params: queryParams,
|
||||
});
|
||||
const formData = reactive({
|
||||
id: null,
|
||||
name: null,
|
||||
app_id: null,
|
||||
app_key: null,
|
||||
status: null,
|
||||
create_time: null,
|
||||
url: null
|
||||
|
||||
})
|
||||
const dialogTableVisible = ref(false)
|
||||
id: null,
|
||||
name: null,
|
||||
app_id: null,
|
||||
app_key: null,
|
||||
status: null,
|
||||
create_time: null,
|
||||
url: null,
|
||||
register_status: null,
|
||||
icon: null,
|
||||
down_url: null,
|
||||
sort: null,
|
||||
app_version: null,
|
||||
});
|
||||
const dialogTableVisible = ref(false);
|
||||
// pop
|
||||
const poptit = ref("")
|
||||
const mode = ref("")
|
||||
|
||||
const poptit = ref("");
|
||||
const mode = ref("");
|
||||
|
||||
// c
|
||||
const addSystemFn = () => {
|
||||
mode.value = "c"
|
||||
poptit.value = "添加子系统"
|
||||
dialogTableVisible.value = true
|
||||
}
|
||||
// r
|
||||
const detailPop = (row: any) => {
|
||||
console.log(row.id)
|
||||
// systemDeleteApi()
|
||||
systemDetailApi({ id: row.id }).then(res => {
|
||||
// console.log(res)
|
||||
for (var prop in formData) {
|
||||
// @ts-ignore
|
||||
formData[prop] = res[prop];
|
||||
}
|
||||
mode.value = "r"
|
||||
poptit.value = "子系统详情"
|
||||
dialogTableVisible.value = true
|
||||
formDisab.value = true
|
||||
})
|
||||
mode.value = "c";
|
||||
poptit.value = "添加子系统";
|
||||
dialogTableVisible.value = true;
|
||||
};
|
||||
const handleAvatarSuccessAvatar: UploadProps["onSuccess"] = (
|
||||
response
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.icon = response.data.uri;
|
||||
};
|
||||
|
||||
}
|
||||
const detailPop = (row: any) => {
|
||||
console.log(row.id);
|
||||
// systemDeleteApi()
|
||||
systemDetailApi({ id: row.id }).then((res) => {
|
||||
// console.log(res)
|
||||
for (var prop in formData) {
|
||||
// @ts-ignore
|
||||
formData[prop] = res[prop];
|
||||
}
|
||||
mode.value = "r";
|
||||
poptit.value = "子系统详情";
|
||||
dialogTableVisible.value = true;
|
||||
formDisab.value = true;
|
||||
});
|
||||
};
|
||||
|
||||
// u
|
||||
const editSystemFn = (row) => {
|
||||
systemDetailApi({ id: row.id }).then(res => {
|
||||
console.log(res)
|
||||
for (var prop in formData) {
|
||||
// @ts-ignore
|
||||
formData[prop] = res[prop];
|
||||
systemDetailApi({ id: row.id }).then((res) => {
|
||||
console.log(res);
|
||||
for (var prop in formData) {
|
||||
// @ts-ignore
|
||||
formData[prop] = res[prop];
|
||||
}
|
||||
});
|
||||
mode.value = "u";
|
||||
poptit.value = "子系统编辑";
|
||||
dialogTableVisible.value = true;
|
||||
|
||||
}
|
||||
})
|
||||
mode.value = "u"
|
||||
poptit.value = "子系统编辑"
|
||||
dialogTableVisible.value = true
|
||||
// refreshView()
|
||||
}
|
||||
};
|
||||
// d
|
||||
const deleteSystemFn = (row: any) => {
|
||||
mode.value = "d"
|
||||
ElMessageBox.confirm(
|
||||
'确认删除该系统吗?',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
icon: markRaw(Delete),
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
systemDeleteApi({ id: row.id })
|
||||
refreshView()
|
||||
// ElMessage({
|
||||
// type: 'success',
|
||||
// message: '删除成功!',
|
||||
// })
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '取消删除',
|
||||
})
|
||||
})
|
||||
}
|
||||
mode.value = "d";
|
||||
ElMessageBox.confirm("确认删除该系统吗?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
icon: markRaw(Delete),
|
||||
})
|
||||
.then(() => {
|
||||
systemDeleteApi({ id: row.id });
|
||||
refreshView();
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "info",
|
||||
message: "取消删除",
|
||||
});
|
||||
});
|
||||
refreshView()
|
||||
};
|
||||
|
||||
const confirm = () => {
|
||||
if (mode.value == "c") {
|
||||
systemAddApi({
|
||||
...formData
|
||||
|
||||
})
|
||||
refreshView()
|
||||
|
||||
} else if (mode.value == "r") {
|
||||
|
||||
} else if (mode.value == "u") {
|
||||
|
||||
systemEditApi({ ...formData })
|
||||
// ElMessage({
|
||||
// type: 'success',
|
||||
// message: '修改成功!',
|
||||
// })
|
||||
|
||||
}
|
||||
dialogTableVisible.value = false
|
||||
refreshView()
|
||||
|
||||
|
||||
}
|
||||
if (mode.value == "c") {
|
||||
systemAddApi({
|
||||
...formData,
|
||||
});
|
||||
refreshView();
|
||||
getLists();
|
||||
} else if (mode.value == "r") {
|
||||
} else if (mode.value == "u") {
|
||||
systemEditApi({ ...formData });
|
||||
}
|
||||
dialogTableVisible.value = false;
|
||||
refreshView();
|
||||
getLists();
|
||||
};
|
||||
const cancel = () => {
|
||||
dialogTableVisible.value = false
|
||||
formDisab.value = false
|
||||
console.log("关闭")
|
||||
for (var prop in formData) {
|
||||
if (formData.hasOwnProperty(prop)) {
|
||||
// @ts-ignore
|
||||
formData[prop] = null;
|
||||
}
|
||||
dialogTableVisible.value = false;
|
||||
formDisab.value = false;
|
||||
console.log("关闭");
|
||||
for (var prop in formData) {
|
||||
if (formData.hasOwnProperty(prop)) {
|
||||
// @ts-ignore
|
||||
formData[prop] = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
getLists();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.avatar-uploader .el-upload {
|
||||
width: 200px;
|
||||
height: 130px;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.headimg {
|
||||
margin-left: 18px;
|
||||
margin-bottom: 18px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
overflow: hidden;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.avatar-uploader-head .el-upload {
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
.avatar {
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,22 +2,7 @@
|
|||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-form class="mb-[-16px]" inline>
|
||||
<el-form-item label="公司名称" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_name"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="队长姓名" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.nickname"
|
||||
clearable
|
||||
placeholder="请输入队长姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="档案名称" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
|
@ -26,24 +11,6 @@
|
|||
placeholder="请输入档案姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="小队" prop="company_id">
|
||||
<ElSelect
|
||||
v-model="queryParams.brigade"
|
||||
placeholder="请选择小队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in [
|
||||
{ brigade_name: '1队', id: '1' },
|
||||
{ brigade_name: '2队', id: '2' },
|
||||
]"
|
||||
:key="index"
|
||||
:label="item.brigade_name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</ElSelect>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
|
|
Loading…
Reference in New Issue