Former-commit-id: 81a9aa7a0dc085dcc7b24290082d0e04ac2f0bf0
Former-commit-id: 21063fbb2347a2f522cb4a1c11fb93ff662f7028
TSXN
wanggang 5 years ago
parent 19e5ba1450
commit fe1b5ddf54

@ -1,5 +1,7 @@
<template>
<div><input type="checkbox" disabled style="width:16px;height:16px;margin:6px 0;" v-model="value" /></div>
<div>
<input type="checkbox" disabled style="width:16px;height:16px;margin:6px 0;" v-model="value" />
</div>
</template>
<script>
export default {

@ -1,8 +1,10 @@
<template>
<div style="overflow:hidden;white-space: nowrap;text-overflow:ellipsis;max-width:20em;" :title="value" v-if="mode==='list'">
{{value}}
<div :data-mode="mode">
<div style="overflow:hidden;white-space: nowrap;text-overflow:ellipsis;max-width:20em;" :title="value" v-if="mode==='list'">
{{value}}
</div>
<div v-else>{{value}}</div>
</div>
<div v-else>{{value}}</div>
</template>
<script>
export default {

@ -15,7 +15,7 @@
<component :is="getDisplayComponent(key)" :title="value.title" :name="key" :value="data.model[key]" :data="data.data" v-if="data.model" />
</template>
<template v-else>
<component :is="getEditComponent(key)" :title="value.title" :name="key" :value="data.model[key]" :data="data.data" :valid="valid(value,key,data.model[key])" :property="value" v-if="data.model" />
<component :is="getEditComponent(key)" :title="value.title" :name="key" :value="data.model[key]" :data="data.data" :valid="valid(value,key,data.model[key])" :mode="edit" v-if="data.model" />
</template>
</div>
<div class="col-sm-4">{{value.description}}</div>

@ -1,10 +1,10 @@
<template>
<div class="form-check">
<input type="checkbox" class="form-check-input" style="height:16px;width:16px;" :name="name" :value="value" />
<div :data-model="mode">
<input type="checkbox" :style="'height:16px;width:16px;'+(mode==='query'?'margin:11px 0;':'margin:6px 0;')" :name="name" :value="value" />
</div>
</template>
<script>
export default {
props: ['title', 'name', 'value', 'data']
props: ['title', 'name', 'value', 'data', 'mode']
};
</script>

@ -10,7 +10,7 @@
</template>
<script>
export default {
props: ['name', 'value', 'data'],
props: ['name', 'value', 'valid', 'data', 'prefix'],
mounted: function () {
this.$nextTick(function () {
$(this.$refs.select).treeMultiselect({

@ -1,6 +1,6 @@
<template>
<div>
<select class="form-control" :name="name">
<select class="form-control" :name="name" v-valid="valid">
<option value="">请选择</option>
<template v-for="item in list">
<option v-if="item.value===value" :value="item.value" selected>{{item.text}}</option>
@ -11,15 +11,14 @@
</template>
<script>
export default {
props: ['name', 'value', 'data','prefix'],
computed:{
list:function(){
var key=this.name;
if(this.prefix)
{
key=this.name.substring(this.prefix.length+1);
props: ['name', 'value', 'valid', 'data', 'prefix'],
computed: {
list: function () {
var key = this.name;
if (this.prefix) {
key = this.name.substring(this.prefix.length + 1);
}
return this.data[key+'SelectList'];
return this.data[key + 'SelectList'];
}
}
};

@ -5,6 +5,6 @@
</template>
<script>
export default {
props: ['name', 'value', 'property', 'valid']
props: ['name', 'value', 'valid', 'data', 'prefix'],
};
</script>

@ -12,7 +12,7 @@
<div class="form-group row">
<label class="col-sm-3 col-form-label" :for="key">{{value.title}}:</label>
<div class="col-sm-9">
<component :is="getQueryComponent(value)" :title="value.title" :name="'query.'+key" :value="data.model.query[key]" v-bind:data="data.data" v-bind:prefix="'query'" v-if="data.model.query" />
<component :is="getQueryComponent(value)" :title="value.title" :name="'query.'+key" :value="data.model.query[key]" :data="data.data" :prefix="'query'" :mode="'query'" v-if="data.model.query" />
</div>
</div>
</div>

Loading…
Cancel
Save