Commit e04c08f1 authored by Mac's avatar Mac

1

parent 4a0b85cd
......@@ -30,7 +30,7 @@
<q-toggle v-if="element.IsLock==1" v-model="element.Enable" :true-value="1" :false-value="2"
icon="lock" disable />
<q-toggle v-else v-model="element.Enable" :true-value="1" :false-value="2"
@update:model-value="godelete(element,1,index)" />
@update:model-value="godelete(element.Enable,1,index)" />
</td>
<td>
<q-toggle v-model="element.Required" :true-value="1" :false-value="2"
......@@ -58,19 +58,20 @@
</div>
</template>
<script lang="ts">
import { defineComponent ,ref, onMounted,reactive } from 'vue'
import requestgroup from '../../../components/customer/request-group.vue'
import { defineComponent ,ref, onMounted, } from 'vue'
// import requestgroup from '../../../components/customer/request-group.vue'
import customerService from '@/api/customer'
import draggable from "vuedraggable";
import { useQuasar } from 'quasar'
interface listType {
Id: number
Enable:number
Required:number
Required?:number
[propName:string]:any
}
export default defineComponent({
components: { draggable ,requestgroup},
components: { draggable },
setup() {
const $q = useQuasar()
let data= ref<Array<listType>>([])
......@@ -95,7 +96,7 @@
}
customerService.setCustomerFiledState(msg).then((res) => {
if (res.data.Code == 1) {
console.log(res)
}else{//如果移动失败 重新获取列表
changePage()
}
......@@ -125,11 +126,13 @@
}
})
}
const godelete = (item:any,type:number,index:number) => {
const godelete = (item:listType,type:number,index:number) => {
let text = ''
console.log(item)
if(type==1){//tyep等于1和2的时候 先让弹出提示 然后再给予掉接口 所以把原本的值暂时先赋值给本身
text = '确定修改启用状态'
if(item.Enable==2){
data.value[index].Enable = 1
}else{
data.value[index].Enable = 2
......@@ -138,6 +141,8 @@
text = '确定修改必填状态'
if(item.Required==2){
data.value[index].Required = 1
console.log( data.value[index].Required,' data.value[index].Required')
}else{
data.value[index].Required = 2
}
......
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