| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="form_['title'].titleType"> |
| | | <el-col :span="22" class="z_grid-content2"> |
| | | <el-col :span="22" class="z_grid-content1"> |
| | | <el-form-item label="描述" prop="titleType" |
| | | :rules="[{required: true, message: '请输入', trigger: ['blur', 'change']}]" |
| | | > |
| | |
| | | <script> |
| | | export default { |
| | | props:{ |
| | | showData_: { |
| | | /* showData_: { |
| | | type: Object, |
| | | required: true |
| | | }, |
| | | form_objs: { |
| | | type: Object, |
| | | required: true |
| | | }, */ |
| | | |
| | | xmId: { |
| | | type: String, |
| | | required: true |
| | | }, |
| | | /* totalItems: { |
| | | type: Array, |
| | | required: true |
| | | } */ |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | |
| | | getDetailed() { |
| | | let me = this; |
| | | let url = "/api/detail/parent/" + this.xmId; |
| | | this.$axios.get(url).then(data_ => { |
| | | me.defaultCheckedKeys = []; |
| | | me.showData = {}; |
| | | let details_ = data_.data.data; |
| | | me.money = 0; |
| | | if(details_.length > 0) {//如果存在明细 |
| | | for(let i=0; i<details_.length; i++) { |
| | | let detail_ = details_[i]; |
| | | //设置树的选中 |
| | | me.defaultCheckedKeys.push(detail_.type); |
| | | //展开所有树节点对应的from |
| | | me.showData[detail_.type] = true; |
| | | |
| | | //给所有的from的数据赋值 |
| | | |
| | | me.form_[detail_.type] = detail_; |
| | | me.form_[detail_.type].userIds = []; |
| | | me.form_[detail_.type].userIds.push(detail_.roleName); |
| | | me.form_[detail_.type].userIds.push(detail_.userId); |
| | | |
| | | me.money += parseFloat(detail_.budget); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | }).catch(error =>{ |
| | | }) |
| | | |
| | | }, |
| | | |
| | | /* getDetailed() { |
| | | this.showData = this.showData_; |
| | | this.form_= this.form_objs; |
| | | this.money = 0; |
| | |
| | | |
| | | let form_obj = {}; |
| | | form_obj = this.form_objs[itm_k]; |
| | | this.money += form_obj.budget; |
| | | this.money += parseFloat(form_obj.budget); |
| | | } |
| | | }, |
| | | }, */ |
| | | |
| | | //单一事件 |
| | | title_titleType(val) { |