{"remainingRequest":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\src\\views\\note\\propertyInfo.vue?vue&type=style&index=0&id=504ca876&lang=css&","dependencies":[{"path":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\src\\views\\note\\propertyInfo.vue","mtime":1679367502655},{"path":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\Users\\小蓝\\Desktop\\赖博士版\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoubXQKewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKfQouZHR7CiAgZGlzcGxheTogYmxvY2s7Cgp9Ci5wdHsKICByaWdodDogMTBweDsKICB0b3A6LTNweDsKICBkaXNwbGF5OiBibG9jazsKICBwb3NpdGlvbjogYWJzb2x1dGU7Cn0K"},{"version":3,"sources":["propertyInfo.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2VA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","file":"propertyInfo.vue","sourceRoot":"src/views/note","sourcesContent":["<template>\n <div class=\"app-container\">\n <div class=\"form-header mt\">\n <h4 class=\"dt h4\">资产详细信息 </h4>\n <el-button type=\"primary\" class=\"pt\" icon=\"el-icon-edit\" @click=\"handleEdit()\" :disabled=\"btn\">编辑</el-button>\n </div>\n\n <el-form ref=\"elForm\" :model=\"formData\" :rules=\"rules\" size=\"medium\" label-width=\"100px\">\n <el-form-item label=\"id\" prop=\"id\">\n <el-input v-model=\"formData.id\" placeholder=\"请输入id\" :maxlength=\"11\" show-word-limit :disabled=\"true\"\n clearable prefix-icon='el-icon-mobile' :style=\"{width: '100%'}\"></el-input>\n </el-form-item>\n <el-form-item label=\"类别\" prop=\"type\">\n <el-select v-model=\"formData.type\" placeholder=\"请选择类别\" clearable :style=\"{width: '100%'}\" :disabled=\"dsb\" >\n <el-option v-for=\"(item, index) in typeOptions\" :key=\"index\" :label=\"item.label\" :value=\"item.value\"\n :disabled=\"item.disabled\"></el-option>\n </el-select>\n </el-form-item>\n <el-form-item label=\"标题\" prop=\"title\">\n <el-input v-model=\"formData.title\" placeholder=\"请输入标题\" clearable :style=\"{width: '100%'}\" :disabled=\"dsb\"></el-input>\n </el-form-item>\n <el-form-item label=\"存储地址\" prop=\"location\">\n <el-input v-model=\"formData.location\" placeholder=\"请输入存储地址\" clearable :style=\"{width: '100%'}\" :disabled=\"dsb\">\n </el-input>\n </el-form-item>\n <el-form-item label=\"持有人\" prop=\"holder\">\n <el-input v-model=\"formData.holder\" placeholder=\"请输入持有人\" clearable :style=\"{width: '100%'}\" :disabled=\"dsb\">\n </el-input>\n </el-form-item>\n <el-form-item label=\"具体位置\" prop=\"address\">\n <el-input v-model=\"formData.address\" placeholder=\"请输入具体位置\" clearable :style=\"{width: '100%'}\" :disabled=\"dsb\">\n </el-input>\n </el-form-item>\n <el-form-item label=\"备注\" prop=\"remark\">\n <el-input v-model=\"formData.remark\" placeholder=\"请输入备注\" clearable :style=\"{width: '100%'}\" :disabled=\"dsb\"></el-input>\n </el-form-item>\n\n <h4 class=\"form-header\">相关图片 </h4>\n <el-upload\n action=\"#\"\n list-type=\"picture-card\"\n multiple\n :http-request=\"requestUpload\"\n :file-list=\"fileList\"\n >\n <i slot=\"default\" class=\"el-icon-plus\"></i>\n <div slot=\"file\" slot-scope=\"{file}\">\n <img\n class=\"el-upload-list__item-thumbnail\"\n :src=\"file.url\"\n alt=\"\"\n style=\"width: 147px; height: 147px\"\n fit=\"cover\"\n :preview-src-list=\"[file.url]\"\n >\n <span class=\"el-upload-list__item-actions\">\n <span\n class=\"el-upload-list__item-preview\"\n @click=\"handlePictureCardPreview(file)\"\n >\n <i class=\"el-icon-zoom-in\"></i>\n </span>\n <span\n v-if=\"!disabled\"\n class=\"el-upload-list__item-delete\"\n @click=\"handleDownload(file.url)\"\n >\n <i class=\"el-icon-download\"></i>\n </span>\n <span\n v-if=\"!disabled\"\n class=\"el-upload-list__item-delete\"\n @click=\"handleRemove(file)\"\n >\n <i class=\"el-icon-delete\"></i>\n </span>\n </span>\n\n\n </div>\n </el-upload>\n\n <h4 class=\"form-header\">其他附件 </h4>\n <el-upload\n action=\"\"\n :file-list=\"fileListOther\"\n class=\"upload-demo\"\n multiple\n :on-preview=\"handlePreview\"\n\n :on-remove=\"handleRemove\"\n :http-request=\"requestUpload\"\n :show-file-list=\"true\"\n >\n <el-button type=\"primary\">Click to upload</el-button>\n <template #tip>\n <div class=\"el-upload__tip\">\n </div>\n </template>\n\n\n </el-upload>\n\n <el-form-item size=\"large\">\n <el-button type=\"primary\" @click=\"submitForm\" :disabled=\"dsb\">修改</el-button>\n </el-form-item>\n </el-form>\n\n <el-dialog :visible.sync=\"dialogVisible\">\n <img w-full :src=\"dialogImageUrl\" alt=\"Preview Image\" />\n </el-dialog>\n </div>\n</template>\n<script>\nimport {getPropertyInfo, updateProperty, uploadPic, download, getCategory} from \"@/api/note/index\";\nimport {addRole, updateRole} from \"@/api/system/role\";\nimport {blobValidate} from \"@/utils/ruoyi\";\nimport errorCode from \"@/utils/errorCode\";\nimport {Message} from \"element-ui\";\n\nexport default {\n components: {},\n props: [],\n data() {\n return {\n cdi:\"资产详细信息\",\n udi:\"资产信息修改\",\n fot:[\".jpg\",\".jif\"],\n fileList:[\n ],\n fileListOther:[\n\n ],\n dsb:true,\n btn:false,\n formData: {\n id: undefined,\n type: undefined,\n title: undefined,\n location: undefined,\n holder: undefined,\n address: undefined,\n remark: undefined,\n url: undefined,\n },\n dialogImageUrl: '',\n dialogVisible: false,\n disabled: false,\n rules: {\n id: [{\n required: true,\n message: '请输入id',\n trigger: 'blur'\n }],\n type: [{\n required: true,\n message: '请选择类别',\n trigger: 'change'\n }],\n title: [{\n required: true,\n message: '请输入标题',\n trigger: 'blur'\n }],\n location: [{\n required: true,\n message: '请输入存储地址',\n trigger: 'blur'\n }],\n holder: [{\n required: true,\n message: '请输入持有人',\n trigger: 'blur'\n }],\n address: [{\n required: true,\n message: '请输入具体位置',\n trigger: 'blur'\n }],\n remark: [{\n required: true,\n message: '请输入备注',\n trigger: 'blur'\n }],\n\n },\n typeOptions: [],\n }\n },\n computed: {},\n watch: {},\n created() {\n const id = this.$route.params && this.$route.params.id;\n let jd;\n if(this.$route.query.detail!=undefined)\n {\n jd = this.$route.query.detail\n this.btn= jd\n this.dsb = !jd\n document.title = \"修改资产详细信息\";\n this.$route.meta.title = \"修改资产详细信息\";//列表的名称\n }\n else{\n document.title = \"查看资产详细信息\";\n this.$route.meta.title = \"查看资产详细信息\";//列表的名称\n }\n\n let _this = this\n if (id) {\n this.loading = true;\n getPropertyInfo(id).then((response) => {\n this.formData = response.data;\n let paths = response.data.url.split(\",\");\n for(let i = 0; i < paths.length; i++)\n {\n if(paths[i]!=\"\") {\n\n let pth = paths[i].substr(paths[i].length - 4, paths[i].length)\n\n if (_this.fot.includes(pth) === true)\n _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})\n else {\n // alert(paths[i])\n let nms = paths[i].split(\"\\/\")\n let nm = nms[nms.length - 1]\n _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})\n }\n }\n }\n this.loading = false;\n });\n this.getCateInfor()\n\n }\n },\n mounted() {},\n methods: {\n /** 查询类别信息 */\n getCateInfor()\n {\n let _this = this\n getCategory().then(response=>{\n\n response.data.itemValues.replace(\"{\",\"\").replace(\"}\",\"\").split(\",\").map(elem=>{\n _this.typeOptions.push({\"label\":elem.split(\":\")[0], \"value\":elem.split(\":\")[0]})\n })\n })\n },\n submitForm() {\n let ul = this.fileList.map(function (elem){\n return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,\"\")\n }).join(\",\")\n let uls = this.fileListOther.map(function (elem){\n return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,\"\")\n }).join(\",\")\n this.formData.url = ul+\",\"+uls\n\n this.$refs['elForm'].validate(valid => {\n\n\n if (valid) {\n if (this.formData.id != undefined) {\n updateProperty(this.formData).then(response => {\n this.$modal.msgSuccess(\"修改成功\");\n // this.open = false;\n this.btn=false\n });\n } else {\n this.$modal.msgSuccess(\"修改失败\");\n\n }\n }\n })\n },\n resetForm() {\n this.$refs['elForm'].resetFields()\n },\n handlePreview(file)\n {\n let formData = {'path':\"/\"+file.url.replace(process.env.VUE_APP_BASE_TRUE_API,\"\")};\n let lens = formData.path.split(\".\")\n let suffix = lens[lens.length-1]\n download(formData).then(async (response) => {\n const isLogin = await blobValidate(response);\n let nt = new Date().getTime()\n let filename = 'property_'+nt+'.'+suffix\n const blob = new Blob([response])\n saveAs(blob, filename)\n })\n },\n handleRemoveFile(file) {\n alert(23)\n },\n handleRemove(file) {\n alert(323)\n },\n handlePictureCardPreview(file) {\n this.dialogImageUrl = file.url;\n this.dialogVisible = true;\n },\n handleDownload(url) {\n var formData = {'path':\"/\"+url.replace(process.env.VUE_APP_BASE_TRUE_API,\"\")};\n\n let lens = formData.path.split(\".\")\n let suffix = lens[lens.length-1]\n download(formData).then(async (response) => {\n const isLogin = await blobValidate(response);\n let nt = new Date().getTime()\n let filename = 'property_'+nt+'.'+suffix\n const blob = new Blob([response])\n saveAs(blob, filename)\n })\n },\n handleEdit()\n {\n this.dsb = false\n this.btn = true\n },\n requestUpload(params)\n {\n var file = params.file;\n var formData = new FormData();\n formData.append('uploadFile', file);\n let _this = this\n\n uploadPic(formData).then(response => {\n let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)\n\n if(_this.fot.includes(pth) === true)\n {\n _this.fileList.push({name:response.data.fileName, \"url\":response.data.url})\n\n }\n\n else{\n _this.fileListOther.push({name:response.data.fileName, url:response.data.url})\n\n }\n })\n\n }\n\n }\n}\n\n</script>\n<style>\n.mt\n{\n position: relative;\n}\n.dt{\n display: block;\n\n}\n.pt{\n right: 10px;\n top:-3px;\n display: block;\n position: absolute;\n}\n</style>\n"]}]}
|