Commit ee508093 by zhangmeng

增加disabledList属性

parent eb59d48d
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "@gic-test/vue-gic-card", "name": "@gic-test/vue-gic-card",
"description": "vue-gic-card Plugin", "description": "vue-gic-card Plugin",
"version": "1.0.43", "version": "1.0.44",
"license": "MIT", "license": "MIT",
"private": false, "private": false,
"main": "dist/vue-gic-card.js", "main": "dist/vue-gic-card.js",
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
@row-click="handleCurrentChangeTable"> @row-click="handleCurrentChangeTable">
<el-table-column label="" width="55"> <el-table-column label="" width="55">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio class="radio-style" :label="scope.row.coupCardId" v-model="radio"> <el-radio class="radio-style" :label="scope.row.coupCardId" v-model="radio" :disabled="scope.row.disabled">
&nbsp; &nbsp;
</el-radio> </el-radio>
</template> </template>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
import qs from 'qs'; import qs from 'qs';
export default { export default {
name: 'vue-gic-card', name: 'vue-gic-card',
props: ['showCardDialog','projectName','cardLimit', 'cardType'], props: ['showCardDialog','projectName','cardLimit', 'cardType','disabledList'],
data () { data () {
return { return {
repProjectName: 'gic-web', // 项目名 repProjectName: 'gic-web', // 项目名
...@@ -138,8 +138,10 @@ ...@@ -138,8 +138,10 @@
handleCurrentChangeTable(val) { // 当前格发生变化时触发 handleCurrentChangeTable(val) { // 当前格发生变化时触发
var that = this var that = this
console.log("table: ",val); console.log("table: ",val);
that.radio = val.coupCardId; if (!val.disabled) {
that.currentRow = val; that.radio = val.coupCardId;
that.currentRow = val;
}
}, },
// 页码变化 // 页码变化
...@@ -245,6 +247,8 @@ ...@@ -245,6 +247,8 @@
if (!!ele.endDate) { if (!!ele.endDate) {
ele.endDate = that.formatDate(ele.endDate,'.') ele.endDate = that.formatDate(ele.endDate,'.')
} }
console.log(ele)
ele.disabled = that.disabledList.indexOf(ele.coupCardId) >= 0;
}) })
that.cardData = resData.result.result that.cardData = resData.result.result
} }
...@@ -281,26 +285,19 @@ ...@@ -281,26 +285,19 @@
let d = myDate.getDate(); let d = myDate.getDate();
return y + flag + formatDig(m) + flag + formatDig(d) + flag return y + flag + formatDig(m) + flag + formatDig(d) + flag
} }
}, },
watch: { watch: {
showCardDialog: function(newData,oldData){ showCardDialog(newData,oldData){
var that = this; this.setNewData(newData)
console.log("新数据:",newData,oldData)
that.setNewData(newData)
}, },
projectName: function(newData,oldData){ projectName(newData,oldData){
var that = this; this.repProjectName = newData || 'gic-web';
// console.log("新数据:",newData,oldData)
that.repProjectName = newData || 'gic-web';
}, },
cardLimit: function(newData,oldData){ cardLimit(newData,oldData){
var that = this; this.cardLimitType = newData;
that.cardLimitType = newData;
}, },
cardType: function(newData,oldData){ cardType(newData,oldData){
var that = this; this.cardTypes = newData;
that.cardTypes = newData;
}, },
}, },
...@@ -319,8 +316,7 @@ ...@@ -319,8 +316,7 @@
that.setNewData(that.showCardDialog) that.setNewData(that.showCardDialog)
}, }
} }
</script> </script>
......
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