/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: /home/henzagold/adminold/export/js/chunk-2d0e186f.cd962f2f.js.map
{"version":3,"sources":["webpack:///./src/views/notify/create.vue","webpack:///src/views/notify/create.vue","webpack:///./src/views/notify/create.vue?58d4","webpack:///./src/views/notify/create.vue?8dd5"],"names":["render","_vm","this","_c","_self","attrs","loading","form","staticClass","directives","name","rawName","value","rules","required","message","expression","on","setShow","_l","types","item","index","key","_v","_s","showUser","filterOption","type","customers","id","_e","users","minRows","maxRows","submit","staticRenderFns","data","created_at","methods","e","err","axios","console","getUsers","rows","getCustomers","input","option","component"],"mappings":"uIAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,SAAS,CAACE,MAAM,CAAC,KAAO,UAAU,SAAWJ,EAAIK,UAAU,CAACH,EAAG,SAAS,CAACE,MAAM,CAAC,KAAOJ,EAAIM,OAAO,CAACJ,EAAG,MAAM,CAACK,YAAY,yCAAyC,CAACL,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQ,UAAU,CAACF,EAAG,UAAU,CAACM,WAAW,CAAC,CAACC,KAAK,YAAYC,QAAQ,cAAcC,MAAO,CAAC,QAAQ,CAACC,MAAO,CAAC,CAAEC,UAAU,EAAKC,QAAS,8BAAiCC,WAAW,gFAAgFR,YAAY,YAAY,GAAGL,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQ,cAAc,CAACF,EAAG,WAAW,CAACM,WAAW,CAAC,CAACC,KAAK,YAAYC,QAAQ,cAAcC,MAAO,CAAC,YAAY,CAACC,MAAO,CAAC,CAAEC,UAAU,EAAKC,QAAS,8BAAiCC,WAAW,oFAAoFR,YAAY,aAAaS,GAAG,CAAC,OAAShB,EAAIiB,UAAUjB,EAAIkB,GAAIlB,EAAImB,OAAO,SAASC,EAAKC,GAAO,OAAOnB,EAAG,kBAAkB,CAACoB,IAAID,EAAMjB,MAAM,CAAC,MAAQiB,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OAAQ,IAAI,GAAG/B,EAAG,WAAW,CAACE,MAAM,CAAC,KAAO,WAAWY,GAAG,CAAC,MAAQhB,EAAIkC,SAAS,CAAClC,EAAIuB,GAAG,0BAA0B,IAAI,IAEl1EY,EAAkB,G,oCCqEP,GACf1B,oBACA2B,KAFA,WAGA,OACA/B,WACAC,iCAAAG,qBACA4B,gBACAN,SACAH,aACAH,YACAE,YACAR,OACA,mBACA,iBACA,aACA,gBACA,YACA,kBAIAmB,SACArB,QADA,oEACAY,GADA,oFAEA,YACAA,KAHA,mBAIA,mBACA,sBALA,gCAKA,gBALA,iCAOAA,KAPA,oBAQA,mBACA,0BATA,kCASA,oBATA,gCAWA,kCAXA,0GAaAK,OAbA,oEAaAK,GAbA,4FAcAA,mBACA,sLACAC,EADA,iCAGA,aAHA,SAIAC,yBAJA,OAKA,qBAEA,mDAPA,mDAUAC,kBAVA,yBAYA,aAZA,qIAfA,yGAgCAC,SAhCA,+KAkCA,gBAlCA,SAmCAF,2BAnCA,gBAmCAG,EAnCA,EAmCAR,KAAAQ,KACA,aApCA,mDAsCAF,kBAtCA,yBAwCA,gBAxCA,oIA2CAG,aA3CA,+KA6CA,gBA7CA,SA8CAJ,gCA9CA,gBA8CAG,EA9CA,EA8CAR,KAAAQ,KACA,iBA/CA,mDAiDAF,kBAjDA,yBAmDA,gBAnDA,oIAsDAhB,aAtDA,SAsDAoB,EAAAC,GACA,wFCnJ+V,I,YCO3VC,EAAY,eACd,EACAjD,EACAoC,GACA,EACA,KACA,WACA,MAIa,aAAAa,E","file":"js/chunk-2d0e186f.cd962f2f.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('a-spin',{attrs:{\"type\":\"loading\",\"spinning\":_vm.loading}},[_c('a-form',{attrs:{\"form\":_vm.form}},[_c('div',{staticClass:\"grid grid-cols-1 md:grid-cols-3 gap-4\"},[_c('a-form-item',{attrs:{\"label\":\"عنوان\"}},[_c('a-input',{directives:[{name:\"decorator\",rawName:\"v-decorator\",value:(['title',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]),expression:\"['title',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]\"}],staticClass:\"w-full\"})],1),_c('a-form-item',{attrs:{\"label\":\"نوع کاربر\"}},[_c('a-select',{directives:[{name:\"decorator\",rawName:\"v-decorator\",value:(['type_send',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]),expression:\"['type_send',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]\"}],staticClass:\"w-full ltr\",on:{\"change\":_vm.setShow}},_vm._l((_vm.types),function(item,index){return _c('a-select-option',{key:index,attrs:{\"value\":index}},[_vm._v(\"\\n \"+_vm._s(item)+\"\\n \")])}),1)],1),(_vm.showUser)?_c('a-form-item',{attrs:{\"label\":\"کاربر\"}},[_c('a-select',{directives:[{name:\"decorator\",rawName:\"v-decorator\",value:(['customer_id',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]),expression:\"['customer_id',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]\"}],staticClass:\"w-full ltr\",attrs:{\"filter-option\":_vm.filterOption,\"show-search\":\"\"}},[(_vm.type == 3)?_vm._l((_vm.customers),function(item,index){return _c('a-select-option',{key:index,attrs:{\"value\":item.id}},[_vm._v(\"\\n \"+_vm._s(item.id)+\" \"+_vm._s(item.name)+\"\\n \")])}):_vm._e(),(_vm.type == 5)?_vm._l((_vm.users),function(item,index){return _c('a-select-option',{key:index,attrs:{\"value\":item.id}},[_vm._v(\"\\n \"+_vm._s(item.id)+\" \"+_vm._s(item.name)+\"\\n \")])}):_vm._e()],2)],1):_vm._e(),_c('a-form-item',{staticClass:\"md:col-span-3\",attrs:{\"label\":\"متن پیام\"}},[_c('a-textarea',{directives:[{name:\"decorator\",rawName:\"v-decorator\",value:(['note', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]),expression:\"['note', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]\"}],attrs:{\"auto-size\":{ minRows: 3, maxRows: 5 }}})],1)],1),_c('a-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.submit}},[_vm._v(\"\\n ارسال\\n \")])],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <a-spin type=\"loading\" :spinning=\"loading\">\r\n <a-form :form=\"form\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\r\n <a-form-item label=\"عنوان\">\r\n <a-input\r\n v-decorator=\"['title',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]\"\r\n class=\"w-full\"\r\n />\r\n </a-form-item>\r\n <a-form-item label=\"نوع کاربر\">\r\n <a-select\r\n v-decorator=\"['type_send',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]\"\r\n class=\"w-full ltr\"\r\n @change=\"setShow\"\r\n >\r\n <a-select-option\r\n v-for=\"(item,index) in types\"\r\n :key=\"index\"\r\n :value=\"index\"\r\n >\r\n {{ item }}\r\n </a-select-option>\r\n </a-select>\r\n </a-form-item>\r\n <a-form-item\r\n v-if=\"showUser\"\r\n label=\"کاربر\"\r\n >\r\n <a-select\r\n v-decorator=\"['customer_id',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]\"\r\n :filter-option=\"filterOption\"\r\n show-search\r\n class=\"w-full ltr\"\r\n >\r\n <template v-if=\"type == 3\">\r\n <a-select-option\r\n v-for=\"(item, index) in customers\"\r\n :key=\"index\"\r\n :value=\"item.id\">\r\n {{ item.id }} {{ item.name }}\r\n </a-select-option>\r\n </template>\r\n <template v-if=\"type == 5\">\r\n <a-select-option\r\n v-for=\"(item, index) in users\"\r\n :key=\"index\"\r\n :value=\"item.id\">\r\n {{ item.id }} {{ item.name }}\r\n </a-select-option>\r\n </template>\r\n </a-select>\r\n </a-form-item>\r\n <a-form-item label=\"متن پیام\" class=\"md:col-span-3\">\r\n <a-textarea v-decorator=\"['note', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]\"\r\n :auto-size=\"{ minRows: 3, maxRows: 5 }\"\r\n />\r\n </a-form-item>\r\n </div>\r\n <a-button\r\n type=\"primary\"\r\n @click=\"submit\"\r\n >\r\n ارسال\r\n </a-button>\r\n </a-form>\r\n </a-spin>\r\n</template>\r\n\r\n<script>\r\nimport axios from '@/axios'\r\nexport default {\r\n name: 'Notification',\r\n data() {\r\n return {\r\n loading: false,\r\n form: this.$form.createForm(this, { name: 'coordinated' }),\r\n created_at: null,\r\n users: [],\r\n customers: [],\r\n showUser: false,\r\n type: undefined,\r\n types: {\r\n 1: 'کارشناسان فروش',\r\n 2: 'مشتریان عمده',\r\n 3: 'یک مشتری',\r\n 4: 'همه مشتریان',\r\n 5: 'یک مدیر',\r\n 6: 'همه مدیران',\r\n },\r\n }\r\n },\r\n methods: {\r\n async setShow(id) {\r\n this.type = id\r\n if (id == 5) {\r\n this.showUser = true\r\n if (this.users.length <= 0) await this.getUsers()\r\n }\r\n else if (id == 3){\r\n this.showUser = true\r\n if (this.customers.length <= 0) await this.getCustomers()\r\n }\r\n else if (this.showUser) this.showUser = false\r\n },\r\n async submit(e) {\r\n e.preventDefault()\r\n this.form.validateFields(async (err, values) => {\r\n if (!err) {\r\n try {\r\n this.loading = true\r\n await axios.post('/notify', values)\r\n this.form.resetFields()\r\n // await this.$router.go(-1)\r\n this.$ntSet('نوتیفیکیشن مورد نظر با موفقیت ارسال شد')\r\n } catch (error) {\r\n // this.$ntGetError(error)\r\n console.log(error)\r\n } finally {\r\n this.loading = false\r\n }\r\n }\r\n })\r\n },\r\n async getUsers() {\r\n try {\r\n this.loading = true\r\n const { data: { rows } } = await axios.post('/users/list')\r\n this.users = rows\r\n } catch (error) {\r\n console.log(error)\r\n } finally {\r\n this.loading = false\r\n }\r\n },\r\n async getCustomers() {\r\n try {\r\n this.loading = true\r\n const { data: { rows } } = await axios.post('/notify/customer')\r\n this.customers = rows\r\n } catch (error) {\r\n console.log(error)\r\n } finally {\r\n this.loading = false\r\n }\r\n },\r\n filterOption(input, option) {\r\n return (option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0)\r\n },\r\n },\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./create.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./create.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./create.vue?vue&type=template&id=1dfa843f&scoped=true&\"\nimport script from \"./create.vue?vue&type=script&lang=js&\"\nexport * from \"./create.vue?vue&type=script&lang=js&\"\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 \"1dfa843f\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
Copyright ©2k19 -
Hexid
|
Tex7ure