|
@@ -13,6 +13,8 @@
|
|
@view="toView"
|
|
@view="toView"
|
|
@edit="toEdit"
|
|
@edit="toEdit"
|
|
@doc="toDoc"
|
|
@doc="toDoc"
|
|
|
|
+ @updoc="toUpload"
|
|
|
|
+ :operaWidth="240"
|
|
></data-table>
|
|
></data-table>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -28,10 +30,34 @@
|
|
</template>
|
|
</template>
|
|
</data-form>
|
|
</data-form>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <el-dialog title="会审文件上传" width="40%" :visible.sync="upDialog" @closed="handleClose" :destroy-on-close="true">
|
|
|
|
+ <el-form>
|
|
|
|
+ <el-form-item label="现场测试(检测,测产)意见">
|
|
|
|
+ <upload :limit="1" :data="file.page5" type="page5" :url="'/files/achieve/apply_file/upload'" @upload="uploadSuccess" @delete="uploadDelete"></upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="评价意见">
|
|
|
|
+ <upload :limit="1" :data="file.page6" type="page6" :url="'/files/achieve/apply_file/upload'" @upload="uploadSuccess" @delete="uploadDelete"></upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="评价专家组名单">
|
|
|
|
+ <upload
|
|
|
|
+ :limit="1"
|
|
|
|
+ :data="file.nameList"
|
|
|
|
+ type="nameList"
|
|
|
|
+ :url="'/files/achieve/apply_file/upload'"
|
|
|
|
+ @upload="uploadSuccess"
|
|
|
|
+ @delete="uploadDelete"
|
|
|
|
+ ></upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-row type="flex" justify="center">
|
|
|
|
+ <el-button type="primary" @click="fileUpdate">保存</el-button>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import upload from '@common/src/components/frame/upload.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
@@ -46,6 +72,7 @@ export default {
|
|
components: {
|
|
components: {
|
|
dataTable,
|
|
dataTable,
|
|
dataForm,
|
|
dataForm,
|
|
|
|
+ upload,
|
|
},
|
|
},
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
@@ -66,6 +93,10 @@ export default {
|
|
label: '会审文件下载',
|
|
label: '会审文件下载',
|
|
method: 'doc',
|
|
method: 'doc',
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ label: '会审文件上传',
|
|
|
|
+ method: 'updoc',
|
|
|
|
+ },
|
|
],
|
|
],
|
|
fields: [
|
|
fields: [
|
|
{ label: '成果编号', prop: 'basic.achieve_num', filter: 'input', showTip: true },
|
|
{ label: '成果编号', prop: 'basic.achieve_num', filter: 'input', showTip: true },
|
|
@@ -91,13 +122,16 @@ export default {
|
|
{ label: '总结状态', model: 'status', type: 'radio' },
|
|
{ label: '总结状态', model: 'status', type: 'radio' },
|
|
{ label: '总结意见', model: 'desc', type: 'textarea' },
|
|
{ label: '总结意见', model: 'desc', type: 'textarea' },
|
|
],
|
|
],
|
|
|
|
+ // 上传upload
|
|
|
|
+ upDialog: false,
|
|
|
|
+ file: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
await this.search();
|
|
await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...achieveApply(['query']),
|
|
|
|
|
|
+ ...achieveApply(['query', 'update']),
|
|
...verifyRecord(['create']),
|
|
...verifyRecord(['create']),
|
|
// 查询列表
|
|
// 查询列表
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
@@ -118,6 +152,8 @@ export default {
|
|
},
|
|
},
|
|
// 取消选择
|
|
// 取消选择
|
|
handleClose() {
|
|
handleClose() {
|
|
|
|
+ this.file = {};
|
|
|
|
+ this.upDialog = false;
|
|
this.form = {};
|
|
this.form = {};
|
|
this.dialog = false;
|
|
this.dialog = false;
|
|
this.sumForm = {};
|
|
this.sumForm = {};
|
|
@@ -150,6 +186,29 @@ export default {
|
|
toDoc({ data }) {
|
|
toDoc({ data }) {
|
|
this.$router.push({ path: '/adminMeet/file', query: { id: data.id } });
|
|
this.$router.push({ path: '/adminMeet/file', query: { id: data.id } });
|
|
},
|
|
},
|
|
|
|
+ toUpload({ data }) {
|
|
|
|
+ this.upDialog = true;
|
|
|
|
+ this.$set(this, `form`, _.cloneDeep(data));
|
|
|
|
+ const file = _.get(data, 'file', {});
|
|
|
|
+ this.$set(this, `file`, file);
|
|
|
|
+ },
|
|
|
|
+ // 图片上传
|
|
|
|
+ uploadSuccess({ type, data }) {
|
|
|
|
+ this.$set(this.file, `${type}`, data.uri);
|
|
|
|
+ },
|
|
|
|
+ // 删除图片
|
|
|
|
+ uploadDelete(data) {
|
|
|
|
+ this.$set(this.file, `${data.type}`, null);
|
|
|
|
+ },
|
|
|
|
+ async fileUpdate() {
|
|
|
|
+ const file = _.cloneDeep(this.file);
|
|
|
|
+ const apply = _.cloneDeep(this.form);
|
|
|
|
+ apply.file = file;
|
|
|
|
+ const res = await this.update(apply);
|
|
|
|
+ if (this.$checkRes(res, '保存成功', '保存失败')) {
|
|
|
|
+ this.handleClose();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|