{"version":3,"sources":["webpack:///./src/components/heritageUnit/form/archaeology/project/list.vue?ac2f","webpack:///./src/components/heritageUnit/form/archaeology/project/list.vue?ddcb","webpack:///./src/components/heritageUnit/form/archaeology/project/list.vue?d492","webpack:///./src/components/heritageUnit/form/archaeology/project/list.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","directives","name","rawName","value","expression","modifiers","ref","attrs","list","scopedSlots","_u","key","fn","on","addData","staticClass","scope","$event","editData","$index","removData","closeDataForm","staticRenderFns","unitId","loading","$message","message","type","console","log","fetchData","then","response","data","catch","error","showDataForm","index","item","Id","$confirm","confirmButtonText","cancelButtonText","splice","id","window","eventBus","$emit","dataId","$on","info","$off","default","components","UnitProjectForm","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,GAAG,CAACA,EAAG,WAAW,CAACE,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,iBAAiBC,MAAOT,EAAW,QAAEU,WAAW,UAAUC,UAAU,CAAC,MAAO,KAAQC,IAAI,SAASC,MAAM,CAAC,KAAOb,EAAIc,OAAO,CAACV,EAAG,kBAAkB,CAACS,MAAM,CAAC,KAAO,cAAc,MAAQ,UAAUT,EAAG,kBAAkB,CAACS,MAAM,CAAC,KAAO,iBAAiB,MAAQ,UAAUT,EAAG,kBAAkB,CAACS,MAAM,CAAC,KAAO,SAAS,MAAQ,UAAUT,EAAG,kBAAkB,CAACS,MAAM,CAAC,KAAO,QAAQ,MAAQ,OAAO,MAAQ,MAAMT,EAAG,kBAAkB,CAACS,MAAM,CAAC,KAAO,WAAW,MAAQ,MAAM,MAAQ,MAAMT,EAAG,kBAAkB,CAACS,MAAM,CAAC,KAAO,SAAS,MAAQ,KAAK,MAAQ,MAAMT,EAAG,kBAAkB,CAACS,MAAM,CAAC,aAAa,SAAS,MAAQ,KAAK,MAAQ,MAAM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IAAMC,EAAO3C,KAAKa,KAAK6B,GACvB1C,KAAKyC,aAAaE,EAAKC,MArC3B,gCAuCmBF,GAAa,WAC5B1C,KAAK6C,SAAL,UAAyB,KAAM,CAC7BC,kBAAmB,KACnBC,iBAAkB,KAClBf,KAAM,YAELI,MAAK,WACJ,IAAIO,EAAO,EAAK9B,KAAK6B,GACrB,eAAWC,EAAKC,IAAIR,MAAK,WACvB,EAAKN,SAAS,CAAEE,KAAM,UAAWD,QAAS,SAC1C,EAAKlB,KAAKmC,OAAON,EAAO,SAG3BH,OAAM,WACL,EAAKT,SAAS,CACZE,KAAM,OACND,QAAS,eAvDnB,mCA4DsBkB,GAClBC,OAAOC,SAASC,MAAM,sBAAuB,CAC3CxB,OAAQ5B,KAAK4B,OACbyB,OAAQJ,MA/Dd,sCAmEIhB,QAAQC,IAAI,0BAnEhB,gCAqEgB,WAEZgB,OAAOC,SAASG,IAAI,uBAAuB,SAAC1B,GAC1C,EAAKA,OAASA,EACd,EAAKO,eAEPe,OAAOC,SAASG,IAAI,yBAAyB,SAACC,GAC5C,EAAKpB,iBA5EX,sCAgFIe,OAAOC,SAASK,KAAK,uBACrBN,OAAOC,SAASK,KAAK,6BAjFzB,GAA6C,QAG3C,gBADC,eAAK,CAAEC,QAAS,K,6BAFE,EAAe,gBALnC,eAAU,CACTC,WAAY,CACVC,gBAAA,iBAGiB,WCrCkb,I,YCOncC,EAAY,eACd,EACA9D,EACA6B,GACA,EACA,KACA,WACA,MAIa,aAAAiC,E","file":"js/chunk-2d0bd94d.f6f27ceb.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{},[_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading.body\",value:(_vm.loading),expression:\"loading\",modifiers:{\"body\":true}}],ref:\"tbList\",attrs:{\"data\":_vm.list}},[_c('el-table-column',{attrs:{\"prop\":\"ProjectName\",\"label\":\"工程名称\"}}),_c('el-table-column',{attrs:{\"prop\":\"PropertiesName\",\"label\":\"工程性质\"}}),_c('el-table-column',{attrs:{\"prop\":\"LxName\",\"label\":\"立项名称\"}}),_c('el-table-column',{attrs:{\"prop\":\"DocNo\",\"label\":\"立项文号\",\"width\":\"\"}}),_c('el-table-column',{attrs:{\"prop\":\"UserName\",\"label\":\"添加人\",\"width\":\"\"}}),_c('el-table-column',{attrs:{\"prop\":\"Status\",\"label\":\"状态\",\"width\":\"\"}}),_c('el-table-column',{attrs:{\"class-name\":\"action\",\"label\":\"操作\",\"width\":\"100\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"header\",fn:function(ref){return [_c('el-tooltip',{attrs:{\"content\":\"添加\",\"placement\":\"top-start\"}},[_c('a',{on:{\"click\":_vm.addData}},[_c('i',{staticClass:\"iconfont icon-btn-add\"})])])]}},{key:\"default\",fn:function(scope){return [_c('el-tooltip',{attrs:{\"content\":\"修改\",\"placement\":\"top-start\"}},[_c('a',{on:{\"click\":function($event){return _vm.editData(scope.$index)}}},[_c('i',{staticClass:\"iconfont icon-pen-edit\"})])]),_c('el-tooltip',{attrs:{\"content\":\"删除\",\"placement\":\"top-start\"}},[_c('a',{on:{\"click\":function($event){return _vm.removData(scope.$index)}}},[_c('i',{staticClass:\"iconfont icon-trash\"})])])]}}])},[_c('span')])],1),_c('unit-project-form',{ref:\"projectCtrl\",attrs:{\"closeDialog\":_vm.closeDataForm}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop } from 'vue-property-decorator'\r\nimport { UnitProjectData, getList, removeData } from '@/api/heritageUnit/unitProject'\r\nimport { newGuid } from '@/configs/functions'\r\nimport UnitProjectForm from './form.vue'\r\n\r\n@Component({\r\n components: {\r\n UnitProjectForm\r\n }\r\n})\r\nexport default class UnitProjectList extends Vue {\r\n public name = 'UnitProjectList'\r\n @Prop({ default: 0 })\r\n public unitId: number = 0\r\n\r\n public loading = false\r\n public list: UnitProjectData[] = []\r\n // dynamic component\r\n public $refs!: {\r\n projectCtrl: UnitProjectForm\r\n }\r\n public loadData() {\r\n if (this.unitId == 0) {\r\n this.$message({\r\n message: '文保单位未匹配,请检查',\r\n type: 'warning'\r\n })\r\n console.log('UnitId为0,请赋值')\r\n }\r\n else {\r\n this.fetchData()\r\n }\r\n }\r\n public fetchData() {\r\n this.loading = true\r\n getList(this.unitId).then((response: { data: any }) => {\r\n this.list = response.data\r\n this.loading = false\r\n }).catch((error: any) => {\r\n console.log(error)\r\n })\r\n }\r\n public addData() {\r\n this.showDataForm(0)\r\n }\r\n public editData(index: number) {\r\n const item = this.list[index]\r\n this.showDataForm(item.Id)\r\n }\r\n public removData(index: number) {\r\n this.$confirm(`确定要删除吗?`, '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n var item = this.list[index]\r\n removeData(item.Id).then(() => {\r\n this.$message({ type: 'success', message: '删除成功' })\r\n this.list.splice(index, 1)\r\n })\r\n })\r\n .catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '操作已取消'\r\n })\r\n })\r\n }\r\n //修改后,直接保存到数据库里\r\n public showDataForm(id: number) {\r\n window.eventBus.$emit('openUnitProjectForm', {\r\n unitId: this.unitId,\r\n dataId: id\r\n })\r\n }\r\n public closeDataForm() {\r\n console.log('closeUnitProjectForm')\r\n }\r\n public mounted() {\r\n //按需加载\r\n window.eventBus.$on('loadUnitProjectList', (unitId: number) => {\r\n this.unitId = unitId\r\n this.fetchData()\r\n })\r\n window.eventBus.$on('submitUnitProjectForm', (info: any) => {\r\n this.fetchData()\r\n })\r\n }\r\n public beforeDestroy() {\r\n window.eventBus.$off('loadUnitProjectList')\r\n window.eventBus.$off('submitUnitProjectForm')\r\n }\r\n}\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./list.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./list.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./list.vue?vue&type=template&id=773a5a92&scoped=true&\"\nimport script from \"./list.vue?vue&type=script&lang=ts&\"\nexport * from \"./list.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"773a5a92\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}