Commit 117d7e19 by zhangzhen

模块添加

parent 9f47bdf4
import http from "@/common/vmeitime-http/index.js"
import config from "@/config/index.config.js"
const setResultData = (data,params=undefined) => {
let obj = {}
for (let i in data) {
obj[i] = data[i]
}
let paramsData = {
"__version__": "2.0",
"__sys__": {},
"__blocks__": {
"inqu_status": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"result": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"detail": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
}
}
}
let keyList = Object.keys(obj);
keyList.forEach((item, index) => {
paramsData.__blocks__.result.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.result.rows.push(Object.values(obj));
if(params){
let keyList2 = Object.keys(params);
keyList2.forEach((item, index) => {
paramsData.__blocks__.inqu_status.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.inqu_status.rows.push(Object.values(params));
}
return paramsData
}
const setParamsData = (data = {},pageData) => {
let obj = {}
for (let i in data) {
obj[i] = data[i]
}
let paramsData = {
"__version__": "2.0",
"__sys__": {},
"__blocks__": {
"inqu_status": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"result": {
"attr": {
count: 0,
limit: pageData && pageData.limit? pageData.limit : 10,
offset: pageData && pageData.offset? pageData.offset*pageData.limit : 0,
orderBy: "",
showCount: pageData && pageData.showCount? pageData.showCount : "true"
},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"detail": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
}
}
}
let keyList = Object.keys(obj);
keyList.forEach((item, index) => {
paramsData.__blocks__.inqu_status.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.inqu_status.rows.push(Object.values(obj));
return paramsData
}
// 列表
export const getList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_03`
let d = setParamsData(params,pageData)
return http.post(url,d)
}
export const getDeviceList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_05`
let d = setParamsData(params,pageData)
return http.post(url,d)
}
// 数据提交接口
export const orderSave = (data,p) => {
let url = `/service/S_SB_JH_02`
let d = setResultData(data,p)
return http.post(url,d)
}
export const getSubList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_01`
let d = setParamsData(params,pageData)
d.__blocks__.inqu_status.attr.filterLogic = "and"
return http.post(url,d)
}
// 数据提交接口
export const orderSubSave = (data) => {
let url = `/service/S_SB_JH_04`
let d = setResultData(data)
return http.post(url,d)
}
export const getPlanDeviceList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_06`
let d = setParamsData(params,pageData)
return http.post(url,d)
}
export const updatePlanDeviceInfo = (data) => {
let url = `/service/S_SB_JH_07`
let d = setResultData(data)
return http.post(url,d)
}
import http from "@/common/vmeitime-http/index.js"
import config from "@/config/index.config.js"
const setResultData = (data,params=undefined) => {
let obj = {}
for (let i in data) {
obj[i] = data[i]
}
let paramsData = {
"__version__": "2.0",
"__sys__": {},
"__blocks__": {
"inqu_status": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"result": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"detail": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
}
}
}
let keyList = Object.keys(obj);
keyList.forEach((item, index) => {
paramsData.__blocks__.result.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.result.rows.push(Object.values(obj));
if(params){
let keyList2 = Object.keys(params);
keyList2.forEach((item, index) => {
paramsData.__blocks__.inqu_status.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.inqu_status.rows.push(Object.values(params));
}
return paramsData
}
const setParamsData = (data = {},pageData) => {
let obj = {}
for (let i in data) {
obj[i] = data[i]
}
let paramsData = {
"__version__": "2.0",
"__sys__": {},
"__blocks__": {
"inqu_status": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"result": {
"attr": {
count: 0,
limit: pageData && pageData.limit? pageData.limit : 10,
offset: pageData && pageData.offset? pageData.offset*pageData.limit : 0,
orderBy: "",
showCount: pageData && pageData.showCount? pageData.showCount : "true"
},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
},
"detail": {
"attr": {},
"meta": {
"desc": "",
"attr": {},
"columns": []
},
"rows": []
}
}
}
let keyList = Object.keys(obj);
keyList.forEach((item, index) => {
paramsData.__blocks__.inqu_status.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.inqu_status.rows.push(Object.values(obj));
return paramsData
}
// 列表
export const getList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_11`
let d = setParamsData(params,pageData)
return http.post(url,d)
}
export const getDeviceList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_12`
let d = setParamsData(params,pageData)
return http.post(url,d)
}
// 数据提交接口
export const orderSave = (data,p) => {
let url = `/service/S_SB_JH_02`
let d = setResultData(data,p)
return http.post(url,d)
}
export const getSubList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_01`
let d = setParamsData(params,pageData)
d.__blocks__.inqu_status.attr.filterLogic = "and"
return http.post(url,d)
}
// 数据提交接口
export const orderSubSave = (data) => {
let url = `/service/S_SB_JH_15`
let d = setResultData(data)
return http.post(url,d)
}
export const getPlanDeviceList = (params={},pageData={}) => {
let url = `/service/S_SB_JH_06`
let d = setParamsData(params,pageData)
return http.post(url,d)
}
export const updatePlanDeviceInfo = (data) => {
let url = `/service/S_SB_JH_13`
let d = setResultData(data)
return http.post(url,d)
}
......@@ -444,6 +444,72 @@
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/device-inspection/index",
"style" :
{
"navigationBarTitleText" : "设备点检",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/device-inspection/edit",
"style" :
{
"navigationBarTitleText" : "详情",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/device-inspection/detail",
"style" :
{
"navigationBarTitleText" : "详情",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/device-maintain/index",
"style" :
{
"navigationBarTitleText" : "设备保养",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/device-maintain/edit",
"style" :
{
"navigationBarTitleText" : "详情",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/device-maintain/detail",
"style" :
{
"navigationBarTitleText" : "详情",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
}
],
"globalStyle": {
......
......@@ -128,7 +128,12 @@
//不良品类
form: {},
factoryIndex:0,
factoryList:[],
factoryList:[
{
value:"",
label:"全部"
}
],
floatTop:"",
floatLeft: "",
floatBoxStatus: false,
......@@ -185,13 +190,14 @@
},
onLoading() {
getParamsList().then(res=>{
this.factoryList = res.data.map(item=>{
let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName
return {
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate();
this.onGetList();
})
......
......@@ -127,7 +127,12 @@
//不良品类
form: {},
factoryIndex:0,
factoryList:[],
factoryList:[
{
value:"",
label:"全部"
}
],
floatTop:"",
floatLeft: "",
floatBoxStatus: false,
......@@ -186,13 +191,14 @@
},
onLoading() {
getParamsList().then(res=>{
this.factoryList = res.data.map(item=>{
let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName
return {
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate();
this.onGetList();
})
......
......@@ -164,7 +164,12 @@
//不良品类
form: {},
factoryIndex:0,
factoryList:[],
factoryList:[
{
value:"",
label:"全部"
}
],
floatTop:"",
floatLeft: "",
floatBoxStatus: false,
......@@ -212,13 +217,14 @@
onLoading() {
getParamsList().then(res=>{
console.log(res,9999999)
this.factoryList = res.data.map(item=>{
let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName
return {
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate();
this.onGetList();
})
......
......@@ -224,7 +224,12 @@
2:"已完工",
},
index:0,
factoryList:[],
factoryList:[
{
value:'',
label:"全部"
}
],
factoryEnum:{},
unCount: 0,
count: 0
......@@ -267,12 +272,13 @@
onLoading() {
getParamsList().then(res=>{
if(res.data && res.data.length){
this.factoryList = res.data.map(item=>{
let list = res.data.map(item=>{
return {
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
this.ongetCount();
this.onGetList();
}
......
......@@ -161,7 +161,12 @@
//不良品类
form: {},
factoryIndex:0,
factoryList:[],
factoryList:[
{
value:"",
label:"全部"
}
],
floatTop:"",
floatLeft: "",
floatBoxStatus: false,
......@@ -208,14 +213,14 @@
},
onLoading() {
getParamsList().then(res=>{
console.log(res,9999999)
this.factoryList = res.data.map(item=>{
let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName
return {
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate();
this.onGetList();
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment