|
@@ -76,6 +76,7 @@ class CompilationController extends BaseController {
|
|
compilationList: compilationList,
|
|
compilationList: compilationList,
|
|
categoryList: categoryList,
|
|
categoryList: categoryList,
|
|
locationList: locationList,
|
|
locationList: locationList,
|
|
|
|
+ typeList: [{label:'建设工程',value:'building'},{label:'公路建设',value:'highway'},{label:'公路养护',value:'yanghu'},{label:'成本测算',value:'cost'}],
|
|
selectedCompilation: selectedCompilation,
|
|
selectedCompilation: selectedCompilation,
|
|
title: config[process.env.NODE_ENV].title ? config[process.env.NODE_ENV].title : '养护云版',
|
|
title: config[process.env.NODE_ENV].title ? config[process.env.NODE_ENV].title : '养护云版',
|
|
layout: 'users/views/layout/layout',
|
|
layout: 'users/views/layout/layout',
|
|
@@ -813,6 +814,28 @@ class CompilationController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 更改编办默认工程所在工
|
|
|
|
+ *
|
|
|
|
+ * @param request
|
|
|
|
+ * @param response
|
|
|
|
+ * @return {Promise.<void>}
|
|
|
|
+ */
|
|
|
|
+ async changeCompilation(request, response) {
|
|
|
|
+ let compilationId = request.body.id;
|
|
|
|
+ let update = request.body.update;
|
|
|
|
+ try {
|
|
|
|
+ let compilationModel = new CompilationModel();
|
|
|
|
+ let result = await compilationModel.updateById(compilationId, update);
|
|
|
|
+ if (result) {
|
|
|
|
+ response.json({ error: 0, message: '', data: null });
|
|
|
|
+ } else {
|
|
|
|
+ response.json({ error: 1, message: '更新数据错误', data: null });
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ response.json({ error: 1, message: '更新数据错误', data: null });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 更改编办默认工程所在工
|
|
* 更改编办默认工程所在工
|