Commit 544c1088 by Mr. Lan

添加全局只读。

parent 6bcfa858
...@@ -33,20 +33,19 @@ ...@@ -33,20 +33,19 @@
</template> </template>
<script> <script>
import Vue from 'vue'
export default { export default {
name: 'App', name: 'App',
methods: { methods: {
handleHome() { handleHome() {
this.$router.push({ path: '/' }) this.$router.push({ path: '/' })
}, },
handleLangCommand(command) { handleLangCommand(command) {
this.$router.replace({ name: this.$route.name, params: { lang: command }}) this.$router.replace({ name: this.$route.name, params: { lang: command }})
}
} }
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
...@@ -96,10 +95,6 @@ ...@@ -96,10 +95,6 @@
.action-item{ .action-item{
display: inline-block; display: inline-block;
margin-left: 15px; margin-left: 15px;
.el-dropdown{
// font-size: 16px;
// font-weight: 500;
}
.el-dropdown-link{ .el-dropdown-link{
cursor: pointer; cursor: pointer;
color: #fff; color: #fff;
......
...@@ -30,79 +30,79 @@ ...@@ -30,79 +30,79 @@
</template> </template>
<script> <script>
export default { export default {
props: { props: {
visible: Boolean, visible: Boolean,
loadingText: { loadingText: {
type: String, type: String,
default: '' default: ''
},
title: {
type: String,
default: ''
},
width: {
type: String,
default: '600px'
},
form: {
type: Boolean,
default: true
},
action: {
type: Boolean,
default: true
}
}, },
data() { title: {
return { type: String,
loading: false, default: ''
dialogVisible: this.visible,
id: 'dialog_' + new Date().getTime(),
showForm: false
}
}, },
computed: { width: {
show() { type: String,
if (this.form) { default: '600px'
return this.showForm },
} else { form: {
return true type: Boolean,
} default: true
}
}, },
watch: { action: {
dialogVisible(val) { type: Boolean,
if (!val) { default: true
this.loading = false }
this.$emit('on-close') },
setTimeout(() => { data() {
this.showForm = false return {
}, 300) loading: false,
} else { dialogVisible: this.visible,
this.showForm = true id: 'dialog_' + new Date().getTime(),
} showForm: false
}, }
visible(val) { },
this.dialogVisible = val computed: {
show() {
if (this.form) {
return this.showForm
} else {
return true
}
}
},
watch: {
dialogVisible(val) {
if (!val) {
this.loading = false
this.$emit('on-close')
setTimeout(() => {
this.showForm = false
}, 300)
} else {
this.showForm = true
} }
}, },
mounted() { visible(val) {
this.dialogVisible = val
}
},
mounted() {
},
methods: {
close() {
this.dialogVisible = false
}, },
methods: { submit() {
close() { this.loading = true
this.dialogVisible = false
},
submit() {
this.loading = true
this.$emit('on-submit') this.$emit('on-submit')
}, },
end() { end() {
this.loading = false this.loading = false
}
} }
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
</template> </template>
<script> <script>
export default { export default {
/* eslint-disable */ /* eslint-disable */
props: ['data'] props: ['data']
} }
</script> </script>
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
:remote="remote" :remote="remote"
:rules="rules" :rules="rules"
:widget="citem" :widget="citem"
@input-change="onInputChange"
:data="data" :data="data"
@input-change="onInputChange"
/> />
</template> </template>
</el-col> </el-col>
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
:widget="item" :widget="item"
:remote="remote" :remote="remote"
:data="data" :data="data"
:disabled="disabled"
@input-change="onInputChange" @input-change="onInputChange"
/> />
</template> </template>
...@@ -64,15 +65,15 @@ ...@@ -64,15 +65,15 @@
</template> </template>
<script> <script>
import GenetateFormItem from './GenerateFormItem' import GenetateFormItem from './GenerateFormItem'
export default { export default {
name: 'FmGenerateForm', name: 'FmGenerateForm',
components: { components: {
GenetateFormItem GenetateFormItem
}, },
/* eslint-disable */ /* eslint-disable */
props: ['data', 'remote', 'value', 'insite'], props: ['data', 'remote', 'value', 'insite', 'disabled'],
data() { data() {
return { return {
models: {}, models: {},
......
...@@ -238,14 +238,14 @@ ...@@ -238,14 +238,14 @@
</template> </template>
<script> <script>
import FmUpload from './Upload' import FmUpload from './Upload'
export default { export default {
components: { components: {
FmUpload FmUpload
}, },
/* eslint-disable */ /* eslint-disable */
props: ['widget', 'models', 'rules', 'remote', 'data'], props: ['widget', 'models', 'rules', 'remote', 'data', 'disabled'],
data() { data() {
return { return {
dataModel: this.models[this.widget.model] dataModel: this.models[this.widget.model]
...@@ -282,12 +282,18 @@ ...@@ -282,12 +282,18 @@
}) })
}) })
} }
if (this.widget.type === 'imgupload' && this.widget.options.isQiniu) { if (this.widget.type === 'imgupload' && this.widget.options.isQiniu) {
this.remote[this.widget.options.tokenFunc]((data) => { this.remote[this.widget.options.tokenFunc]((data) => {
this.widget.options.token = data this.widget.options.token = data
}) })
} }
if (this.disabled === undefined || this.disabled === null) {
this.widget.options.disabled = false
} else {
this.widget.options.disabled = this.disabled
}
}, },
methods: { methods: {
} }
......
...@@ -389,13 +389,13 @@ ...@@ -389,13 +389,13 @@
</template> </template>
<script> <script>
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
export default { export default {
components: { components: {
Draggable Draggable
}, },
/* eslint-disable */ /* eslint-disable */
props: ['data'], props: ['data'],
data() { data() {
return { return {
......
...@@ -35,16 +35,18 @@ ...@@ -35,16 +35,18 @@
@add="handleWidgetColAdd($event, element, colIndex)" @add="handleWidgetColAdd($event, element, colIndex)"
> >
<transition-group name="fade" tag="div" class="widget-col-list"> <transition-group name="fade" tag="div" class="widget-col-list">
<widget-form-item <template v-for="(el, i) in col.list">
v-for="(el, i) in col.list" <widget-form-item
v-if="el.key" v-if="el.key"
:key="el.key" :key="el.key"
:element="el" :element="el"
:select.sync="selectWidget" :select.sync="selectWidget"
:index="i" :index="i"
:data="col" :data="col"
:data-config="data" :data-config="data"
/> />
</template>
</transition-group> </transition-group>
</draggable> </draggable>
...@@ -78,15 +80,15 @@ ...@@ -78,15 +80,15 @@
</template> </template>
<script> <script>
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
import WidgetFormItem from './WidgetFormItem' import WidgetFormItem from './WidgetFormItem'
export default { export default {
components: { components: {
Draggable, Draggable,
WidgetFormItem WidgetFormItem
}, },
/* eslint-disable */ /* eslint-disable */
props: ['data', 'select'], props: ['data', 'select'],
data() { data() {
return { return {
......
...@@ -230,12 +230,12 @@ ...@@ -230,12 +230,12 @@
</template> </template>
<script> <script>
import FmUpload from './Upload' import FmUpload from './Upload'
export default { export default {
components: { components: {
FmUpload FmUpload
}, },
/* eslint-disable */ /* eslint-disable */
props: ['element', 'select', 'index', 'data', 'dataConfig'], props: ['element', 'select', 'index', 'data', 'dataConfig'],
data() { data() {
return { return {
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
</template> </template>
<script> <script>
export default { export default {
mounted() { mounted() {
}
} }
}
</script> </script>
import Vue from 'vue'
import GenerateForm from './components/GenerateForm.vue' import GenerateForm from './components/GenerateForm.vue'
import './styles/cover.scss' import './styles/cover.scss'
......
...@@ -3,29 +3,29 @@ ...@@ -3,29 +3,29 @@
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue'
export default { export default {
watch: { watch: {
'$route.params.lang': function(val) { '$route.params.lang': function(val) {
this.loadLanguage()
}
},
created() {
this.loadLanguage() this.loadLanguage()
}, }
methods: { },
loadLanguage() { created() {
if (this.$route.params.lang == 'zh-CN') { this.loadLanguage()
Vue.config.lang = 'zh-CN' },
localStorage.setItem('language', 'zh-CN') methods: {
} else if (this.$route.params.lang == 'en-US') { loadLanguage() {
Vue.config.lang = 'en-US' if (this.$route.params.lang === 'zh-CN') {
localStorage.setItem('language', 'en-US') Vue.config.lang = 'zh-CN'
} else { localStorage.setItem('language', 'zh-CN')
this.$router.replace({ name: this.$route.name, params: { lang: navigator.language == 'zh-CN' ? 'zh-CN' : 'en-US' }}) } else if (this.$route.params.lang === 'en-US') {
} Vue.config.lang = 'en-US'
localStorage.setItem('language', 'en-US')
} else {
this.$router.replace({ name: this.$route.name, params: { lang: navigator.language === 'zh-CN' ? 'zh-CN' : 'en-US' }})
} }
} }
} }
}
</script> </script>
...@@ -6,7 +6,7 @@ import LanguageView from './LanguageView.vue' ...@@ -6,7 +6,7 @@ import LanguageView from './LanguageView.vue'
Vue.use(Router) Vue.use(Router)
const language = localStorage.getItem('language') || (navigator.language == 'zh-CN' ? 'zh-CN' : 'en-US') const language = localStorage.getItem('language') || (navigator.language === 'zh-CN' ? 'zh-CN' : 'en-US')
export default new Router({ export default new Router({
routes: [ routes: [
......
...@@ -50,10 +50,11 @@ ...@@ -50,10 +50,11 @@
:remote="remoteFunc" :remote="remoteFunc"
:value="tplItem.form_data" :value="tplItem.form_data"
:data="tplItem.form_structure" :data="tplItem.form_structure"
:disabled="true"
/> />
</div> </div>
<div v-if="processStructureValue.userAuthority"> <div v-if="processStructureValue.userAuthority">
<!-- <hr style="background-color: #d9d9d9; border:0; height:1px;"> --> <hr style="background-color: #d9d9d9; border:0; height:1px;">
<div class="text item" style="text-align: center;margin-top:18px"> <div class="text item" style="text-align: center;margin-top:18px">
<template v-for="(item, index) in processStructureValue.edges"> <template v-for="(item, index) in processStructureValue.edges">
<el-button <el-button
...@@ -169,10 +170,11 @@ export default { ...@@ -169,10 +170,11 @@ export default {
// 获取当前展示节点列表 // 获取当前展示节点列表
for (var i = 0; i < this.processStructureValue.nodes.length; i++) { for (var i = 0; i < this.processStructureValue.nodes.length; i++) {
if (this.processStructureValue.nodes[i].id === this.processStructureValue.workOrder.current_state) { if (this.processStructureValue.nodes[i].id === this.processStructureValue.workOrder.current_state) {
// 当前节点
this.nodeStepList.push(this.processStructureValue.nodes[i]) this.nodeStepList.push(this.processStructureValue.nodes[i])
this.activeIndex = this.nodeStepList.length - 1 this.activeIndex = this.nodeStepList.length - 1
if (i === this.processStructureValue.nodes.length - 2) { if (i + 1 === this.processStructureValue.nodes.length) {
this.activeIndex = i + 1 this.activeIndex = this.nodeStepList.length
} }
} else if (!this.processStructureValue.nodes[i].isHideNode) { } else if (!this.processStructureValue.nodes[i].isHideNode) {
// 非隐藏节点 // 非隐藏节点
...@@ -191,7 +193,7 @@ export default { ...@@ -191,7 +193,7 @@ export default {
flow_properties: item.flowProperties === undefined ? 2 : parseInt(item.flowProperties), flow_properties: item.flowProperties === undefined ? 2 : parseInt(item.flowProperties),
work_order_id: parseInt(this.$route.query.workOrderId) work_order_id: parseInt(this.$route.query.workOrderId)
}).then(response => { }).then(response => {
if (response.code === 100000) { if (response.code === 200) {
// this.$router.push({ name: 'upcoming' }) // this.$router.push({ name: 'upcoming' })
window.location.reload() window.location.reload()
} }
......
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 sign in to comment