Commit af4868f9 authored by 李苏's avatar 李苏 💬

zghywpc-vue 基础数据 巡检相关

parent 146086eb
# Draco 3D Data Compression
Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
[Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco)
## Contents
This folder contains three utilities:
* `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser.
* `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices.
* `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder.
Each file is provided in two variations:
* **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco).
* **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension).
Either variation may be used with `THREE.DRACOLoader`:
```js
var dracoLoader = new THREE.DRACOLoader();
dracoLoader.setDecoderPath('path/to/decoders/');
dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support.
```
Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder).
## License
[Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -12,7 +12,7 @@ export default class ModelLoader { ...@@ -12,7 +12,7 @@ export default class ModelLoader {
this.viewer = viewer this.viewer = viewer
this.scene = viewer.scene this.scene = viewer.scene
/* 创建管理器*/ /* 创建管理器*/
this.loaderGLTF = new GLTFLoader() // 加载gltf模型 this.loaderGLTF = new GLTFLoader(LoadingManager) // 加载gltf模型
this.loaderFBX = new FBXLoader(LoadingManager) // 加载fbx模型 this.loaderFBX = new FBXLoader(LoadingManager) // 加载fbx模型
this.dracoLoader = new DRACOLoader() // 加载draco模型(加载基于Google Draco压缩格式的3D模型的类) this.dracoLoader = new DRACOLoader() // 加载draco模型(加载基于Google Draco压缩格式的3D模型的类)
this.dracoLoader.setDecoderPath('/js/draco/') // 设置draco模型解码器路径 this.dracoLoader.setDecoderPath('/js/draco/') // 设置draco模型解码器路径
......
...@@ -14,7 +14,7 @@ export default class SkyBoxs { ...@@ -14,7 +14,7 @@ export default class SkyBoxs {
* *
* @param {*} type 天空盒类型 * @param {*} type 天空盒类型
*/ */
setSkybox(type = skyboxType.day) { setSkybox(type = skyboxType.night) {
const loaderbox = new THREE.CubeTextureLoader() // 加载贴图 const loaderbox = new THREE.CubeTextureLoader() // 加载贴图
const cubeTexture = loaderbox.load([ const cubeTexture = loaderbox.load([
`/images/skybox/${type}/posx.jpg`, `/images/skybox/${type}/posx.jpg`,
......
...@@ -27,6 +27,7 @@ export default class Viewer { ...@@ -27,6 +27,7 @@ export default class Viewer {
*/ */
constructor(id,vdom) { constructor(id,vdom) {
Cache.enabled = false // 开启缓存 Cache.enabled = false // 开启缓存
this.canRequestAnimationFrame=true
this.vdom=vdom||null this.vdom=vdom||null
this.id = id this.id = id
this.renderer = undefined this.renderer = undefined
...@@ -46,18 +47,18 @@ export default class Viewer { ...@@ -46,18 +47,18 @@ export default class Viewer {
this.#initLight() this.#initLight()
const animate = () => { const animate = () => {
// console.log(this.vdom) if(this.canRequestAnimationFrame){
requestAnimationFrame(animate) requestAnimationFrame(animate)
this.#updateDom() this.#updateDom()
this.#renderDom() this.#renderDom()
// 全局的公共动画函数,添加函数可同步执行
this.animateEventList.forEach( this.animateEventList.forEach(
event => { event => {
event.fun && event.content && event.fun(event.content) event.fun && event.content && event.fun(event.content)
}) })
} }
}
animate() animate()
} }
/** /**
...@@ -169,6 +170,15 @@ export default class Viewer { ...@@ -169,6 +170,15 @@ export default class Viewer {
*/ */
#initControl() { #initControl() {
this.controls = new OrbitControls(this.camera, this.renderer.domElement) this.controls = new OrbitControls(this.camera, this.renderer.domElement)
this.controls.maxPolarAngle = Math.PI / 2; // 限制最大俯仰角,防止看到地底
this.controls.minPolarAngle = 0; // 限制最小俯仰角
// 或者,如果你想要设置一个稍微严格一点的限制,比如防止相机直接指向地面
// 你可以将最小仰角设置为一个稍微大于0的值(比如Math.PI / 18,大约是10度)
this.controls.minPolarAngle = Math.PI / 18; // 最小仰角限制为大约10度
this.controls.enableDamping = false // 是否开启阻尼 this.controls.enableDamping = false // 是否开启阻尼
this.controls.screenSpacePanning = false // 定义当平移的时候摄像机的位置将如何移动, 摄像机将在与摄像机向上方向垂直的平面中平移 this.controls.screenSpacePanning = false // 定义当平移的时候摄像机的位置将如何移动, 摄像机将在与摄像机向上方向垂直的平面中平移
} }
...@@ -176,10 +186,10 @@ export default class Viewer { ...@@ -176,10 +186,10 @@ export default class Viewer {
* 初始化天空盒 * 初始化天空盒
*/ */
#initSkybox() { #initSkybox() {
/* if (!this.skyboxs) { if (!this.skyboxs) {
this.skyboxs = new SkyBoxs(this) this.skyboxs = new SkyBoxs(this)
} }
this.skyboxs.setSkybox() */ this.skyboxs.setSkybox()
} }
/** /**
* 初始化灯光 * 初始化灯光
......
...@@ -28,6 +28,51 @@ import Layout from '@/layout' ...@@ -28,6 +28,51 @@ import Layout from '@/layout'
} }
*/ */
export const powerRoutes = [ export const powerRoutes = [
{
path: '/jcxxgl',
component: "Layout",
hidden: false,
alwaysShow: true,
redirect: 'gjxx',
meta: {
title: "基础信息管理",
icon: "fa-cog",
noCache: false,
link: null,
mkid: '920010000'
},
children: [
/* 基础数据 */
{
erpComponent: false,
component: 'jcxxgl/gjxx/index',
hidden: false,
meta: {
"title": "工具信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920010100',
},
name: 'gjxx',
path: "gjxx",
},
{
erpComponent: false,
component: 'jcxxgl/wlxx/index',
hidden: false,
meta: {
"title": "物料信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920010200',
},
name: 'wlxx',
path: "wlxx",
}
]
},
/*基础数据*/ /*基础数据*/
{ {
path: '/sbxxgl', path: '/sbxxgl',
...@@ -100,6 +145,9 @@ export const powerRoutes = [ ...@@ -100,6 +145,9 @@ export const powerRoutes = [
name: 'jzbm', name: 'jzbm',
path: "jzbm", path: "jzbm",
}, },
]
},
{ {
path: '/yhlywsytst', path: '/yhlywsytst',
component: "Layout", component: "Layout",
...@@ -128,7 +176,51 @@ export const powerRoutes = [ ...@@ -128,7 +176,51 @@ export const powerRoutes = [
}, },
name: 'yhlywsytst', name: 'yhlywsytst',
path: "yhlywsytst", path: "yhlywsytst",
}], }
],
},
{
path: '/sbjxgl',
component: "Layout",
hidden: false,
alwaysShow: true,
redirect: 'sbjxxx',
meta: {
title: "设备检修管理",
icon: "fa-cog",
noCache: false,
link: null,
mkid: '920030000'
},
children: [
/* 基础数据 */
{
erpComponent: false,
component: 'sbjxgl/sbjxxx/index',
hidden: false,
meta: {
"title": "设备检修信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920030100',
},
name: 'sbjxxx',
path: "sbjxxx",
},
{
erpComponent: false,
component: 'sbjxgl/jxzyff/index',
hidden: false,
meta: {
"title": "检修左右方法",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920030200',
},
name: 'jxzyff',
path: "jxzyff",
} }
] ]
} }
......
<template>
<BasePage :power='power' ref="basePage" class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
export default {
name: 'gjxx',
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'jcgl/ugjxx',
tableTitle: [{
title: "编码",
field: "code",
fieldType: "upper",
width: 140
},
{
title: "名称",
field: "name",
width: 140
},
{
title: "材质",
field: "cz",
width: 140
},
{
title: "规格",
field: "gg",
width: 140
},
{
title: "型号",
field: "xh",
width: 140
},
{
title: "备注",
field: "bz",
width: 300
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
}
}
</script>
<style>
</style>
<template>
<BasePage :power='power' ref="basePage" class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
export default {
name: 'wlxx',
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'jcgl/uwlxx',
tableTitle: [{
title: "编码",
field: "code",
fieldType: "upper",
width: 140
},
{
title: "名称",
field: "name",
width: 140
},
{
title: "规格",
field: "gg",
width: 140
},
{
title: "备注",
field: "bz",
width: 300
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
}
}
</script>
<style>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '材质',
prop: 'cz',
span: 12,
type: 'input',
},
{
label: '规格',
prop: 'gg',
span: 12,
type: 'input',
},
{
label: '型号',
prop: 'xh',
span: 12,
type: 'input',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
}
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'gjxx',
data() {
return {
config: {
/* 基本配置*/
url: 'jcgl/ugjxx',
tableTitle: [{
title: "编码",
field: "code",
fieldType: "upper",
width: 140
},
{
title: "名称",
field: "name",
width: 140
},
{
title: "材质",
field: "cz",
width: 140
},
{
title: "规格",
field: "gg",
width: 140
},
{
title: "型号",
field: "xh",
width: 140
},
{
title: "备注",
field: "bz",
width: 300
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '规格',
prop: 'gg',
span: 12,
type: 'input',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'wlxx',
data() {
return {
config: {
/* 基本配置*/
url: 'jcgl/uwlxx',
tableTitle: [{
title: "编码",
field: "code",
fieldType: "upper",
width: 140
},
{
title: "名称",
field: "name",
width: 140
},
{
title: "规格",
field: "gg",
width: 140
},
{
title: "备注",
field: "bz",
width: 300
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'jxzyff',
data() {
return {
config: {
/* 基本配置*/
url: 'jxgl/ujxzyff',
tableTitle: [{
title: "编码",
field: "code",
fieldType: "upper",
width: 140
},
{
title: "名称",
field: "name",
width: 140
},
{
title: "备注",
field: "bz",
width: 300
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '检修内容',
prop: 'jxnr',
span: 24,
type: 'textarea',
required: true,
},
{
label: '检修时间',
prop: 'jxsj',
span: 12,
type: 'datetime',
required: true,
},
{
label: '检修方法',
prop: 'jxffid',
span: 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jxgl/ujxzyff/query",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '完工报告',
prop: 'wgbg',
span: 24,
type: 'textarea',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div class="min_full" style="border-top: 0px;height: 140vh;">
<div style="height:477px;width: 100%;">
<BasePage @getRow='getRow' class="min_full" style="height: 477px;border: 0px;border-bottom: 5px solid #eee;"
ref="basePage" :config="config">
<template #dialog="ctx">
</template>
<template #toolbar="ctx">
<ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'sbgl/usbxx/import'" />
<AttachFileButton style="margin-left: 10px;" :app='ctx.basePage' />
</template>
</BasePage>
</div>
<div style="height: calc(100% - 477px);width: 100%;">
<el-tabs class="full" v-model="activeName">
<el-tab-pane class="full" label="检修工具" style="height: 100%;" name="jxgj">
<Jxgj :app='this' class="full" ref='jxgj' />
</el-tab-pane>
<el-tab-pane class="full" label="检修物料" style="height: 100%;" name="jxwl">
<Jxwl :app='this' class="full" ref='jxwl' />
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import Edit from './edit.vue'
import Jxgj from './jxgj'
import Jxwl from './jxwl'
export default {
name: 'sbjxxx',
data() {
return {
activeName: 'jxgj',
config: {
/* 基本配置*/
url: 'jxgl/usbjx',
tableTitle: [{
title: "检修内容",
field: "jxnr",
width: 350
},
{
title: "检修时间",
field: "jxsj",
fieldType: "ftDateTime"
},
{
title: "检修方法",
field: "jxffid",
width: 140,
transform: {
url: 'jxgl/ujxzyff/query',
"label": "name",
"value": "id"
}
},
{
title: "完工报告",
field: "wgbg",
width: 350
},
{
title: "备注",
field: "bz",
width: 200
},
{
title: "维护人",
field: "whr",
width: 120
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
{
title: "维护人",
field: "whr",
hidden: true,
width: 120
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[{
label: '检修时间',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDatetimerangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '检修内容',
prop: 'jxnr',
span: 6,
type: 'input',
value: ''
}
]
],
}
}
},
methods: {
/* 示例*/
getRow(row) {
this.$refs.jxgj.$refs.basePage.queryParams.mid = row.id
this.$refs.jxgj.$refs.basePage.refresh()
this.$refs.jxwl.$refs.basePage.queryParams.mid = row.id
this.$refs.jxwl.$refs.basePage.refresh()
}
},
components: {
Edit,
Jxgj,
Jxwl
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-tabs__content {
height: calc(100% - 60px);
}
::v-deep .el-tabs__nav-scroll {
padding-left: 10px;
}
.hastree {
height: calc(100vh - 84px);
overflow: hidden;
overflow-x: auto;
}
</style>
<template>
<RelDialog ref="RelDialog" width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
import gjxx from '@/views/auxinput/gjxx'
export default {
mixins: [editMixin],
mounted() {
this.$nextTick(() => {
this.form.mid = this.app.queryParams.mid
if (!this.form.mid) {
this.$warning('请选择一条检修内容')
this.$refs.RelDialog.closeAll()
}
})
},
data() {
return {
editColItemList: [{
label: '检修工具',
prop: 'gjxxid',
span: 24,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
dynamic: true,
code: true,
component: gjxx,
label: 'jxgjName',
transform: {
value: 'id',
label: 'name'
}
}
}
]
}
},
methods: {
}
}
</script>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full"
style="height: 100%;border: 0px;" :autoQuery='false' :config="config">
<template #dialog="ctx">
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'sbdagl/sbxx/bjqd/import'" /> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
data() {
return {
power: {
add: true,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: true,
/* 是否渲染右侧操作按钮 */
operateButtons: true,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'jxgl/ujxgj',
tableTitle: [{
title: "检修工具",
field: "jxgjName",
width: 140
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [],
}
}
},
methods: {
getRow(val) {
this.$emit('getRow', val)
},
demo(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
console.log(ctx.singleItem)
} else {
this.$warning('请选中一条数据')
}
}
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<RelDialog ref="RelDialog" width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
import wlxx from '@/views/auxinput/wlxx'
export default {
mixins: [editMixin],
mounted() {
this.$nextTick(() => {
this.form.mid = this.app.queryParams.mid
if (!this.form.mid) {
this.$warning('请选择一条检修内容')
this.$refs.RelDialog.closeAll()
}
})
},
data() {
return {
editColItemList: [{
label: '物料名称',
prop: 'wlid',
span: 24,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
dynamic: true,
code: true,
component: wlxx,
label: 'wlxxName',
transform: {
value: 'id',
label: 'name'
}
}
}
]
}
},
methods: {
}
}
</script>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full"
style="height: 100%;border: 0px;" :autoQuery='false' :config="config">
<template #dialog="ctx">
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'sbdagl/sbxx/bjqd/import'" /> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
mounted(){
this.$nextTick(()=>{
setTimeout(()=>{
this.$refs.basePage.$refs.TablePager.czFixed=undefined
},2000)
})
},
data() {
return {
power: {
add: true,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: true,
/* 是否渲染右侧操作按钮 */
operateButtons: true,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'jxgl/ujxwl',
tableTitle: [{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [],
}
}
},
methods: {
getRow(val) {
this.$emit('getRow', val)
},
demo(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
console.log(ctx.singleItem)
} else {
this.$warning('请选中一条数据')
}
}
},
components: {
Edit
}
}
</script>
<style>
</style>
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
field: "name", field: "name",
width: 140 width: 140
}, },
{
title: "备注",
field: "bz",
width: 300
},
{ {
title: "创建人", title: "创建人",
field: "cjr", field: "cjr",
...@@ -54,7 +59,8 @@ ...@@ -54,7 +59,8 @@
} }
], ],
queryParams: [ queryParams: [
[{ [
{
label: '编码', label: '编码',
prop: 'code', prop: 'code',
span: 6, span: 6,
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
field: "name", field: "name",
width: 140 width: 140
}, },
{
title: "备注",
field: "bz",
width: 300
},
{ {
title: "创建人", title: "创建人",
field: "cjr", field: "cjr",
......
...@@ -138,7 +138,8 @@ ...@@ -138,7 +138,8 @@
}, },
{ {
title: "创建人", title: "创建人",
field: "cjr" field: "cjr",
width:120
}, },
{ {
title: "创建时间", title: "创建时间",
...@@ -148,7 +149,8 @@ ...@@ -148,7 +149,8 @@
{ {
title: "维护人", title: "维护人",
field: "whr", field: "whr",
hidden: true hidden: true,
width:120
}, },
{ {
title: "维护时间", title: "维护时间",
......
This diff is collapsed.
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