Commit 544c1088 by Mr. Lan

添加全局只读。

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