BUG 30988

This commit is contained in:
aixianling
2022-08-29 11:37:17 +08:00
parent 99ee6f83f9
commit 6a847bd991

View File

@@ -12,7 +12,8 @@
<el-input size="small" :maxlength="30" placeholder="请输入大屏项目名称" v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="描述" style="width: 100%;" prop="description">
<el-input size="small" :maxlength="200" :rows="5" type="textarea" style="width: 100%;" placeholder="请输入描述" v-model="form.description"></el-input>
<el-input size="small" :maxlength="200" :rows="5" type="textarea" style="width: 100%;" placeholder="请输入描述"
v-model="form.description"></el-input>
</el-form-item>
<el-form-item label="是否开启" style="width: 100%;" prop="status">
<el-switch
@@ -93,10 +94,10 @@
</template>
<script>
import Layout from './Layout.vue'
import Sortable from 'sortablejs'
import Layout from './Layout.vue'
import Sortable from 'sortablejs'
export default {
export default {
name: 'Add',
props: {
instance: Function,
@@ -152,7 +153,7 @@
methods: {
getInfo() {
let {id} = this.$route.query
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => {
id && this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => {
if (res?.data) {
this.form = {
...res.data
@@ -179,8 +180,8 @@
})
},
onStatusChange (id) {
this.instance.post(`${this.urlPrefix}/appdiylargescreen/enableLargeScreen?id=${id}`).then(res => {
onStatusChange(id) {
id && this.instance.post(`${this.urlPrefix}/appdiylargescreen/enableLargeScreen?id=${id}`).then(res => {
if (res.code === 0) {
this.getInfo()
this.$message.success('操作成功')
@@ -293,7 +294,7 @@
})
}
}
}
}
</script>
<style scoped lang="scss">